05-30-2017 03:38 AM
Hi All,
I am developing an application in Alfresco Activiti App which has multiple levels with different user actions. At 1st step I am generating a document using a form info and a template. Now, I would like to display the same document to the user in the next level.
I tried with Adding Attach but I could not display document.
When I tried with Attach only document name is getting displayed like below:
To view this document, I have to go to part of process and then view it like below:
Instead, How can I display the same document in the Tasks page itself?
Could someone help me in this?
Thanks in Advance,
Naveen Vatambeti.
05-30-2017 02:51 PM
If you know the content ID you can use a Hyperlink with the following URL:
/activiti-app/app/rest/content/5005/rendition/preview
Notice the 5005 in the URL is the content ID of the attachment, you will need to retrieve this when you create/save the document and put it into a variable so you can include it in the Hyperlink definition.
Obviously you could get a lot fancier with a custom form stencil, but whatever you do, you will need to pull the document with the URL shown (I think this is what the tasklist uses).
Greg
05-31-2017 08:07 AM
Thank you Greg Greg Harley for the quick response. I have tried to check the solution that you have suggested. I could see the document getting loaded when i hit the URL. I am generating the document using Activiti, here could you suggest me how to get the content id when the document is generated?
Thanks in Advance,
Naveen Vatambeti
05-31-2017 03:27 PM
First, you need to provide me the code you are using the create the document.
In general for Enterprise Edition, you can retrieve any documents associated with the process instance using the RelatedContentService.
E.g. relatedContentService.getRelatedContentForProcessInstance(instanceId, pageSize, page);
Cheers,
Greg
06-01-2017 02:32 AM
Thanks Greg for one more quick response. I am actually doing this using Generate Document Activity using a template. I did not write any code to achieve this task.
Thanks in Advance,
Naveen Vatambeti
06-01-2017 06:07 PM
06-03-2020 06:47 AM
Hi Naveen,
I am seeking for the same thing can i contact you regarding to discuss this.
Thanks in Advance
Vamsi
Explore our Alfresco products with the links below. Use labels to filter content by product module.