cancel
Showing results for 
Search instead for 
Did you mean: 

multi instance sub process,variable conflict?

leebm
Champ in-the-making
Champ in-the-making
i have activity A and assignee variable $
{recevier} (eg: assignee kermit);
multi sub process element variable same named recevier;
activity C assignee variable ${recevier}
;
when complete sub process,and set recevier value 'gonzo' then task C also assignee 'kermit' not 'gonzo'.
if i change sub process element variable another name eg:accept, when complete sub process,task C assignee is right.

my test code:
List<String> signs = new ArrayList<String>();
signs.add("gonzo");
signs.add("fozzie");
      
Map<String, Object> vars = new HashMap<String, Object>();
vars.put("signs", signs);
vars.put("recevier", "kermit");
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("mult", vars);
            taskService.complete(taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult().getId(), vars);

issue: https://jira.codehaus.org/browse/ACT-1953      
Task b = taskService.createTaskQuery().taskAssignee("gonzo").singleResult();
vars.put("recevier", "gonzo");
taskService.complete(b.getId(), vars);      
System.out.println(taskService.createTaskQuery().taskAssignee("kermit").list().size());// result 1
1 REPLY 1

jbarrez
Star Contributor
Star Contributor
I'm not sure I can follow what you try to do here?
Can you post a unit test with xml and in understandable English what goes wrong?