HI All,
We have a requirement to generate a PDF document and download on click of a link. to generate the PDF we use Generate PDF smart service and this needs a process to be executed execute.
The issue we need to generate the document in-flight and download it.
User is viewing a report and user should be able to download the report data as PDF on click on a link provided on the report.
At the moment I have found any solution other than on click of the link to show another link to download.
Discussion posts and replies are publicly visible
In 17.2 at least, you can use a!startProcess to launch a process model which will do your PDF generation, and pass back the generated doc ID to your SAIL form.
In my brief live test before writing my prior comment, I quickly created a new process model with one script task node which sets a value to a particular PV, and what I found is that this value is passed back to the SAIL form successfully in the onSuccess() parameter of a!startProcess. Assuming this extrapolates out to running the process through some doc generation, it seems like it would work as needed.
I understand that you can generate the document in that model and potentially pass the generated doc id back to the interface, but the use case from the post is also to download the document without the user having to make another click. Once you have passed the document id back to the interface, you would have to generate a SAIL link for the user to make another click. Did you have a way to do the document download without another click from the end-user?
Hi Mike, quick question related to a document creation. After creating a document using a PDF template, I, as an admin user, am able to get the document id in the OnSuccess event of the process model. But the users are not able to get to the document id in the same event. It always returns null. They are set up as Admins on the folders where the document resides. The documents are showing up as created by them but yet the docid is null. Any thoughts?
Can you confirm whether the document creation processes are chained all the way through?
hi Mike,I have similar requirement as mentioned above in my case I have a nested SAIL form and the last form has this download option.Now I could successfully start PM to generate document but am not able to pass the DocID generated in the process model back to UI Below you can see the code snippet:
saveInto: a!startProcess( processModel: cons!DQEM_PM_EXPORT_EXCEL, processParameters: { ScorecardReviewDetails: ri!summaryData, docId: local!documentId }, onSuccess: { a!save(ri!document, local!documentId) } )
Can you please help me identify the issue here.
Thanks,
Preji
Do you have the chaining till the node that generates the DocID?
Yes I do have activity chaining enabled
Do you just need to replace one of the a!save() parameters with fv!processInfo.pv.docId?
docs.appian.com/.../Start_Process_Smart_Service.html