07-10-2017 03:25 PM
Given a Process Instance ID OR ContentId, I need to be able to display to the user in a downloadable format all files attached during that workflow. These files are being stored as BLOBs in an Oracle database table. Is there a way I can display these files to the user following a query of that process instance ID? The "link" column of this table is empty.
07-11-2017 04:43 PM
Ok I have attached it. Thank you for your diligence, Ciju
07-26-2019 06:42 AM
Hi Ciju,
does the community version stores the attached file in ACT_HI_ ATTACHMENT db ?
Regards,
sekhar
07-11-2017 04:51 PM
Looks like you are complicating this. You don't have to do any of that if all you trying to do is display a previously selected attachment. Please find attached a modified version where you can use display value field to select an attachment.
07-11-2017 05:17 PM
I'm trying to display a document attached in a previous process instance, not the current one
07-11-2017 05:42 PM
It is best to be done using the Java APIs associated with related contents. You can refer to an example at activiti-examples/activiti-copy-attachments-from-parent-process at master · cijujoseph/activiti-exam....
If it is one or two files, using the url field field is an option too. Please find attached an example showing how to do it. to run this example, you need to know the content id which you can obtain using rest apis.
Hope this helps. Also, when asking questions, it would be great if you can provide as much details as you can at the beginning including some attachments like unit tests, prototypes etc which will help save time!
07-12-2017 09:45 AM
Ciju, this still does not resolve my issue. The processes would not be related in any way; there is no parent-child relationship. I basically need to create a search engine where a user can find/download ANY content that has been uploaded in an entirely different process.
07-12-2017 09:48 AM
Understood. I was just showing an example of how to use the JAVA APIs. You will have to write your logic based on your needs.
Ciju
07-12-2017 10:13 AM
I am unable to import your app, I see the error
"Error while processing the app definition file : Could not deserialize form definition "
07-12-2017 11:02 AM
Are you using a version older than 1.6? I created the app in 1.6.3 and if you are using one of the older versions (1.5.x or below) you may get this error.
07-12-2017 11:26 AM
As I am unable to view your example, would you mind explaining what you have done? I understand I perform an API call to retrieve the file using its contentId. When I have done this, it returns the raw file in a way that does not let me map it to a variable which I can then display in another form. How do I get from the API call to being able to view/download the file?
Explore our Alfresco products with the links below. Use labels to filter content by product module.