JBoss Community

Re: A question on the external event using event Correlation

created by byungwoojun in jBPM - View the full discussion

As I addressed above, to support an async message event (external), I store a unique correlation id, with a session id and a process instance id. When an intermediate message arrives, I restore a session and a procss instance is based on the incoming message correlation id field. Using the following code:

 

ksession.signalEvent(eventType, eventData, restoredProcessInstanceId);

 

It worked nicely, but there is a problem. If the async message event is in a reusable sub-process (not in the top-level process), the above method won't work because the sub-process has its own process id. I looked at the jBPM ProcessInstanceInfo database table, there is no link between the parent and the sub-process.

 

So, how do I get the sub-process process id when the top-level hit the async message event and returns back to the process caller?

 

Any suggestion will be appreciated.

 

bwj

 

 

Reply to this message by going to Community

Start a new discussion in jBPM at Community