03-09-2017 09:49 AM
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!
04-21-2017 04:32 AM
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:
03-09-2017 11:58 AM
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
03-10-2017 04:40 AM
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
03-15-2017 11:56 AM
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
04-21-2017 04:32 AM
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:
Explore our Alfresco products with the links below. Use labels to filter content by product module.