byungwoojun [
http://community.jboss.org/people/byungwoojun] created the discussion
"A question on the external event using event Correlation"
To view the discussion, visit:
http://community.jboss.org/message/592470#592470
--------------------------------------------------------------
I have a use case which needs to handle multiple intermeidate message events from external
partners (applications) in a process. Let's say each external partner sends the JMS
message (or Web Services, which does not matter in this case) toward the process. To
handle this, I can put multiple event nodes and set up the event type for each event node
in the process. And, I can make a JMS listener (e.g., MDB) that translates incoming JMS
messages into event data object. Since the external partners have no idea about the
knowledge session nor process instance (not supposed to), the JMS message does NOT have
those data fields. But, using some JMS fields (content-based mapping), I may be able to
map them to a particular event type.
Here is my question. Now, I need to find a paritcular "running" knowledge
session and/or process instance based on the incoming JMS message. There could be multiple
running session and process instances. How do I get/know a particular session / process
instance id to send a signalEvent? I went through jBPM 5 sample test code came with jBPM
5, but they didn't explain this use case. The jBPM 5 user document says, "it is
also possible to have the engine *automatically* determine which process instances might
be interested in an event using event correlation, which is based on the event type."
What if there are multiple running instances waiting for the same event type?
Any suggestion or sample code will be appreciated.
bwj
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/592470#592470]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]