Alfresco Share: accessing bpm_comment in Activiti

2019-05-08 18:22发布

问题:

In Activiti workflow, how can I access variable bpm_comment for each comment that's input by user?

If I'm using bpm_comment in every task, it shows the same comment (the first one).

回答1:

I've solved it!

In each userTask I used the following code to retrieve bpm:comment.

var taskId = "activiti$" + task.getId();
var taskComment = workflow.getTask(taskId).getProperties()["bpm:comment"];