Search code examples
javaworkflowalfrescoactivitibusiness-process-management

How to generate an empty bpm:comment box in Alfresco Activiti Workflow Task?


I'm developing a custom workflow, where I would like comments from the previous task to be shown in the task form for the next task. To achieve this, I have a custom 'previous comment' text property which is rendered as a read-only text area. In each task I also have a bpm:comment field for the user to add their comments when they complete the task (I need to use bpm:comment because otherwise the comments are not saved in the workflow history table).

In my workflow process, I set the 'previous comment' property to the value of the bpm:comment from the previous task, which works fine. However, on the next task, the bpm:comment field is shown containing the comment from the start task. I've attached an image displaying this (in this case, "Admin comments" is the first comment inputted when the workflow is started). I've also added my files. What I want to change, is for the bpm:comment field to be rendered with an empty text box, but I can't figure out how to do this. Any suggestions?

Marcus

https://i.sstatic.net/1fBxS.png


Solution

  • With some help from Vikash, I've figured out how to do this. After setting the value of the previous comment variable, I set the value of bpm_comment to null, which clears the field in the task form but maintains the comment in the workflow history