How to generate summary document based on completed workflow?

cancel
Showing results for 
Search instead for 
Did you mean: 
Established Member II

How to generate summary document based on completed workflow?

I'd like to generate a summary document (PDF, HTML, etc.) after the workflow's finish (something similar to the workflow-details page). Do you have any clues how could it be done? Or maybe someone has already implemented a similar feature?

I heard it's easy in the APS (you have a button to generate PDF?) but I'm using Alfresco Community version... 

4 Replies
Community Manager
Community Manager

Re: How to generate summary document based on completed workflow?

Hi @upforsin,

With Alfresco Process Services there is the "Audit Log"  when reviewing a process & this will produce something like what you want. There is also an audit API

Activiti has the auditLogBean which "generate(s) audit logs in .pdf format for a completed process instance or a completed task" - looks like this might do what you want?

Cheers,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!
Established Member II

Re: How to generate summary document based on completed workflow?

Thank you for your reply @EddieMay.

With the APS, I can call 

GET api/enterprise/process-instances/{process-instance-id}/audit-log

but in the community version, this GET request (and all other requests related to "audit") is unavailable. 

Do you think if I create ServiceTask with an expression similar to 

${auditLogBean.generateProcessInstancePdf(execution, 'My first process instance audit log', true, 'myFieldName')}

, it will generate a PDF somewhere in the document library?

Community Manager
Community Manager

Re: How to generate summary document based on completed workflow?

Hi @upforsin,

The documentation says, "You can view the audit logs from the My Tasks app by clicking the "Audit Log" link when viewing the details of a completed process or task. When doing so the following two rest calls are made."

Process instance audit log:
GET app/rest/process-instances/{process-instance-id}/audit
Task audit log:
GET app/rest/tasks/{task-id}/audit

I'm not sure if these rest calls have been exposed? So you may have to do as you suggest.

HTH,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!
Established Member II

Re: How to generate summary document based on completed workflow?

Hi @EddieMay,

In the Actviti alone it might be a solution, but in the Alfresco Community 6.1.x with the embedded Activiti 5.22.0, according to my knowledge,  there is no such a thing as "My Task app". As this is only an embedded engine, I guess I cannot use these REST calls.