cancel
Showing results for 
Search instead for 
Did you mean: 

Change a workflow task description dynamically?

jdbrown
Champ in-the-making
Champ in-the-making
How would one go about changing the task description dynamically?  I would like to append the content name (bpm_package.children[0].name) to the task node description so it is easier to identify in the "My Tasks to Do" dashlet.

It does not appear that the bpm_workflowTask property is exposed in the Javascript API.  If not, how could I access the task description via a Java action?

Thanks.
3 REPLIES 3

davidc
Star Contributor
Star Contributor
There's an example of this in the 2.1 wcm submit process…

  <task name="wcmwf:reviewTask">
           <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
              <actor>#{bpm_assignees.get(wcmwf_approveCnt)}</actor>
           </assignment>
           <event type="task-assign">
              <script>
                 if (wcmwf_reviewCycle > 1)
                    taskInstance.description = taskInstance.description + " (" + wcmwf_reviewCycle + ")";
              </script>
           </event>          
        </task>

jdbrown
Champ in-the-making
Champ in-the-making
Thanks David!

lucille_arkenst
Champ in-the-making
Champ in-the-making
Then how do you get a handle to the workflow so you can change its description? 
(I want to create a standalone JavaScript that changes one workflow's description.)

Thanks!