I'm creating a workflow for a document review process. I've successfully implemented a "comments" box for the review tasks allowing the reviewers to leave comments about the document. These comments can be viewed in the workflow details in share.
What I would like the workflow to do is to display these comments as part of the form in the following task (e.g. if a document is rejected, the workflow will more to an "Amend Document" task, and when this task form is viewed, I would like the comments from the reviewer to be displayed as part of the form).
My plan is to define a workflow process comments variable, set it at the end of each task, and then display it in the next form. I am able to set the variable, but I am unsure on how to display this in another task, and whether this needs to be done in the workflow bpmn file or in the share-config-custom.xml.
Any help would be greatly appreciated!
Solved! Go to Solution.
Hi Greg
Apologies for the late reply - I have not been able to do much work on Alfresco since I asked the original question!
I have managed to partially figure out how to do this, and it is actually quite simple. I've defined an aspect for the "previous task comment" in my workflow model, and applied this aspect to my tasks. Then, in the model file, I set the value of this aspect to the value of the bpm:Comment from the previous task, and render it in the task form as a read-only text area. I am still having one small issue, in that for some reason the bpm:comment boxes for the tasks are being rendered with text already existing in them, although this isn't preventing the operation of the workflow. I've made that into another question on the alfresco community, if anyone has any ideas regarding that:
If you are using ACtiviti Enterprise you should use the Alfresco document widget within the forms editor to display the documents.
The following blog post should help you out:
Thanks,
Greg
Hi Greg
Thanks for your answer. Unfortunately I am not using Activiti Enterprise as I'm working with Alfresco Community Edition, so I'm hand building the workflows myself.
Thanks
Can't speak to "share" I know nothing about it.
I assume you are using the "comments" feature of the workflow engine:
Activiti User Guide - Create a new comment on a task
There is also the ability to create comments on the process instance :
Activiti User Guide - Create a new comment on a historic process instance
Not sure which one you are using but suffice to say, there are ways to retrieve both these entities.
Perhaps I dont understand what you are doing, a process model, form definition and screen shots may help.
Greg
Hi Greg
Apologies for the late reply - I have not been able to do much work on Alfresco since I asked the original question!
I have managed to partially figure out how to do this, and it is actually quite simple. I've defined an aspect for the "previous task comment" in my workflow model, and applied this aspect to my tasks. Then, in the model file, I set the value of this aspect to the value of the bpm:Comment from the previous task, and render it in the task form as a read-only text area. I am still having one small issue, in that for some reason the bpm:comment boxes for the tasks are being rendered with text already existing in them, although this isn't preventing the operation of the workflow. I've made that into another question on the alfresco community, if anyone has any ideas regarding that:
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.