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.
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
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
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
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
Hi Naveen,
I am seeking for the same thing can i contact you regarding to discuss this.
Thanks in Advance
Vamsi
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.