AnsweredAssumed Answered

multi instance sub process,variable conflict?

Question asked by leebm on Mar 20, 2014
Latest reply on Mar 24, 2014 by jbarrez
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

Outcomes