cancel
Showing results for 
Search instead for 
Did you mean: 

signalEventReceived & local variables

fritz128
Champ in-the-making
Champ in-the-making
I launch many subrocess by command:

for (int i = 0; i < count; i++) {
  signalEventReceived(signalName, executionId, subprocessVars);
}

I can't use multi-instance because I doesn't know the amount of subprocesses and I have to launch new subprocess on user request.

Problem:
Each subprocess contains the same set of variables, so they should be overriden by siblings subprocesses.
signalEventReceived(signalName, executionId, subprocessVars) writes to the global process context.
Question:

How to write local subprocess variables on subprocess start? Something like setVariableLocal.
12 REPLIES 12

trademak
Star Contributor
Star Contributor
1. That's correct
2. No JMS has nothing to do with a message event. A message event works with logical messages and you can just invoke the Activiti API to send a message to the Engine, without needing something like JMS.

Best regards,

fritz128
Champ in-the-making
Champ in-the-making
And maybe the last question (it is very important):
You've said that my first statement is right (about interrupting). But I need my main process wait untill finish of all event subprocesses.
Does it mean that event subprocess is not appropriate to me?

trademak
Star Contributor
Star Contributor
Yes, the event sub process will end any running execution, so it might not be appropriate for you.

Best regards,