AnsweredAssumed Answered

MultiInstance with dynamic task name and assignees

Question asked by swamy2156 on Aug 11, 2017

Hi,

 

I have a requirement like N number of tasks has to be created and assigned to N number of groups. As far as I see, I can use one collection and one element variable.

my variableMap is

variableMap.put("assigneeList", Arrays.asList("a","b","c"));

variableMap.put("tasknameList",Arrays.asList("ABC","DEF","GHI"));

 

The following snippet replaces ${assignee} but there is no provision for replace ${taskName}. Is it possible to generate taskName dynamically from tasknameList

<userTask id="usertask1" name="${taskName}" activiti:assignee="${assignee}">
<multiInstanceLoopCharacteristics isSequential="false" activiti:collection="assigneeList" activiti:elementVariable="assignee">

</multiInstanceLoopCharacteristics>
</userTask>

Any help is appreciated.

 

thank you.

Outcomes