Tuesday, January 25, 2011

Task Comments in Alfresco jBPM workflow as process variable

It is very powerful to have alfresco JavaScript APIs accesible in node event scripts in jBPM workflows.

Most of the workflow variables are accesible in jBPM process definition in alfresco.
Such as bpm:assignee is available as bpm_assignee, bpm:workflowDueDate is available as bpm_workflowDueDate, bpm:workflowPriority as bpm_workflowPriority etc

But the task Comments entered by the user is unfortunately not available directly. However, you can still access it by the following syntax in the script.

var comment = ""; 
if (token.comments.size() > 0) 
    comment = token.comments.get(0).message;

The comment variable is now available in your script.


  1. How can I do these steps in Activiti?

  2. Hello Nice Thanks For Sharing post.

    All your comment for JBPM Workflow Process are welcome.

    Thanks in advance.