cancel
Showing results for 
Search instead for 
Did you mean: 

How to set input parameters in Multi-instance callActivity

fuhang
Champ in-the-making
Champ in-the-making
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}" ?
3 REPLIES 3

fuhang
Champ in-the-making
Champ in-the-making
<!– main process –>
<callActivity id="invest-department-handle-subprocess" name="xxx" calledElement="subprocess-audit">
      <extensionElements>
        <activiti:in source="cosponser" target="assignee"></activiti:in>
       …
      </extensionElements>
      <multiInstanceLoopCharacteristics isSequential="false" activiti:collection="${cosponsers}" activiti:elementVariable="cosponser"></multiInstanceLoopCharacteristics>
    </callActivity>

<!– subprocess –>
<process id="subprocess-audit" name="subprocess-audit" isExecutable="true">
    <userTask id="testTask" name="testTask" activiti:assignee="${assignee}"></userTask>
    …
</process>

fuhang
Champ in-the-making
Champ in-the-making
this is definition snippet

fuhang
Champ in-the-making
Champ in-the-making
I solved problem. I made a stupid mistake, the designer tool not refresh, some flow get wrong transition.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.