I have process…
subprocess.bpmn (7.0 KB)
In CreateUsers i want to set variables for subprocesses…
public void execute(DelegateExecution delegateExecution) throws Exception {
User user1 = new User("user1","user1",30);
User user2 = new User("user2","user2",35);
List<User> users = new ArrayList<>();
users.add(user1);
users.add(user2);
delegateExecution.setVariableLocal("users",users);
}
… and how expected i get two subprocess…
How can i get variable subid and/or user, now?
Currently i doing…
@RequestMapping(value = "/info")
public @ResponseBody String getTask(){
List<VariableInstance> subid1 = runtimeService.createVariableInstanceQuery()
.variableName("subid")
.list();
Object value;
for (VariableInstance variableInstance : subid1) {
value = variableInstance.getValue();
if (value.equals(35)) {
System.out.println("FIND!");
}
}
return "OK ";
}
}
How i can get this variable easier (without loop)?
Why can’t i running variable valueEquals() method?
Variable value, i know (i get it from form) and want find it vulue in subprocess variables.
Sorry for my English.
May be i wrong in bulding process.
No experience bpm.