Advertisement
Guest User

ExecutionListener, end event in the start task

a guest
Mar 3rd, 2017
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. <activiti:executionListener event="end" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener">
  2. <activiti:field name="script">
  3. <activiti:string><![CDATA[for (var i = 0; i < bpm_package.children.length; i++) {
  4.  
  5. if (bpm_package.children[i].typeShort == "hrf:pastaLote") {
  6. execution.setVariable('hrf_empreendimento', bpm_package.children[i].properties["hrf:empreendimento"]);
  7. execution.setVariable('hrf_quadra', bpm_package.children[i].properties["hrf:quadra"]);
  8. execution.setVariable('hrf_lote', bpm_package.children[i].properties["hrf:lote"]);
  9.  
  10. var description = bpm_package.children[i].properties["hrf:empreendimento"] + " > " +
  11. bpm_package.children[i].properties["hrf:quadra"] + " > " +
  12. bpm_package.children[i].properties["hrf:lote"];
  13.  
  14. execution.setVariable("bpm_workflowDescription", description);
  15. }
  16. }]]></activiti:string>
  17. </activiti:field>
  18. </activiti:executionListener>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement