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.
Solved! Go to Solution.
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...
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);
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.
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...
Worked Perfect, Thanks for the help .....
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.