Hi Nipun,
You need to explain in more detail what you are trying to do and what you have tried. It's not clear.
Thanks!
Hi @sajithmendis ,
Could you please explain the issue in more detail?
Thanks & Best Regards,
Nipun
@Mathias Dahl - The customer upgraded from APP8 to APP10. They use MWO. Here is their initial issue from case G2317758:
“Our database process that gathers and sends work task information as a JSON document to IndySoft (the external system now used by our Field Service technicians) is unable to read the contents of files from any Document Repository that is not located on the database server.
While we have set up a new repository that is located on the database server, there are many existing document attachments from before our IFS10 upgrade that need to be sent with task information, but are saved in a repository on a different machine. All attempts to get the document contents to add to the outgoing JSON have failed or have required manual preparation that we cannot ask our office personnel to perform before running the procedure.”
In addition, they say:
“Attempt to run the following sql in the Production database, which attempts to read file contents from one of the shared repositories:
select mac_work_order_api.loadBlobFromFile2('MWO_DOC-1001083-1-A1-1.PDF','MAC_HIST_WO_DIR') from dual
If successful, the select will return a single BLOB value representing the Base64 encoding of the PDF file. As of now, that select will return error ORA-22288. Unless we follow the process detailed in the workaround section for a given document from one of the external shared repositories, the file will not be read by the DBMS_LOB functions in our process.”
Thanks!
You could try to use Batch_Transfer_Handler_Api.Read_From_Shared to get the file from a shared repository to a temporary folder on the application server, then upload the file to the database repository, then use the current code. You can find examples on how it is used in Edm_File_API, where we use it to move files between document repositories.
Or use the Change Document Repository assistant to move document files into the Database repository.
Note: this is really an "internal" API, and is therefore used on your own risk. We do not support other uses than what Docman needs internally. The API might also break at any time, if we need to change it for some reason.
Also, the approach might not work in IFS Cloud.
Good luck!