SHARE
TWEET

ExecutionListener, end event in the start task

a guest Mar 3rd, 2017 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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>
RAW Paste Data
Pastebin PRO Summer Special!
Get 60% OFF on Pastebin PRO accounts!
Top