02-03-2022 12:34 AM
In my custom workflow, I want to assign a user Task to multiple users so I have set a variable
execution.setVariable('assigneeList', ['admin','signer1']);
even tried execution.setVariable('assigneeList', [admin,signer1]);
And this is multiInstanceLoopCharacteristics code
<multiInstanceLoopCharacteristics isSequential="false" activiti:collection="assigneeList" activiti:elementVariable="assignee">
</multiInstanceLoopCharacteristics>
I am not able to assign my list of users in the workflow , I am getting errors . Can anyone please help me how I can assign the above list of users to a user Task.
02-03-2022 02:39 AM
Why are you using "Java.type"?
You may try this approach: https://github.com/flowable/flowable-engine/blob/main/modules/flowable-secure-javascript/src/test/re...
02-03-2022 01:44 AM
Try using the Java approach:
var ArrayList = Java.type("java.util.ArrayList"); var assigneeList= new ArrayList; assigneeList.add("admin"); assigneeList.add("signer1"); execution.setVariable("assigneeList", assigneeList);
02-03-2022 02:31 AM
Dear Angel ,
Thanks for your response, Im getting Java error after following your method
This is my listener
<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string><![CDATA[
--"-----"------"-----------------------
var ArrayList = Java.type("java.util.ArrayList");
var assigneeList= new ArrayList;
assigneeList.add("admin");
assigneeList.add("signer1");
execution.setVariable("assigneeList", assigneeList);
]]></activiti:string>
</activiti:field>
</activiti:taskListener>
Kindly assist on this.
02-03-2022 02:39 AM
Why are you using "Java.type"?
You may try this approach: https://github.com/flowable/flowable-engine/blob/main/modules/flowable-secure-javascript/src/test/re...
02-03-2022 03:36 AM
Worked Perfect, Thanks for the help .....
Explore our Alfresco products with the links below. Use labels to filter content by product module.