I have a main process and the main process call a subprocess in callActivity, I have some trouble in multi-instance of callActivity.
1. process definition snippet:
<!– main process –>
<callActivity id="riskcontrol-department-handle-subprocess" name="callauditsubprocess" calledElement="audit-subprocess">
<extensionElements>
<activiti:in source="cosponser" target="assignee"></activiti:in>
….
</extensionElements>
<multiInstanceLoopCharacteristics isSequential="false" activiti:collection="${cosponsers}" activiti:elementVariable="cosponser"></multiInstanceLoopCharacteristics>
</callActivity>
<!– subprocess: audit-subprocess–>
<process id="audit-subprocess" name="audit-subprocess" isExecutable="true">
<userTask id="testTask" name="testTask" activiti:assignee="${assignee}"></userTask>
….
</process>
2. code snippet:
String taskId = "…";
List<String> cosponsers = new ArrayList<String>( 2 );
cosponsers.add( "x" );
cosponsers.add( "y" );
variables.put( "cosponsers", cosponsers );
taskService.complete( taskId, variables );
3. problem:
I can't instance two testTasks in subprocess with the %{assignee} of task assignee, but the database record can be find a act_ru_task record without assignee. How to transfer activiti:elementVariable="cosponser" to activiti:assignee="${assignee}" ?