[jBPM] - Does the ksession.dispose() work safely?
by byungwoojun
byungwoojun [http://community.jboss.org/people/byungwoojun] created the discussion
"Does the ksession.dispose() work safely?"
To view the discussion, visit: http://community.jboss.org/message/604592#604592
--------------------------------------------------------------
I am creating a ksession per startProcess, and after use of the ksession, I dispose it (using the processEventListener afterProcessCompleted event). If I test my process one by one, there was no problem with the ksession.dispose(). However, I noticed that if I started multiple processes at a similar time, the ksession.dispose() causes the NullPointerException. When multiple processes are invoked, there are multiple active independent ksession objects, in my case. Then, each process starts calling the ksesion.dispose() when it finishes its job. The first ksession.dispose() function code sets NULL to the applicationScopeEntityManger object after use. As the name indicates, the applicationScopeEntityManager seems to be application-level. Once it is set to NULL, the subsequent ksession.dispose() has a problem using the applicationScopeEntityManager (which is already set to NULL).
In enterprise application, it is normal there always many processes are invoked concurrently.
So, I started wondering how the ksession.dispose() works???
Any suggestion will be appreciated.
bwj
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/604592#604592]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 7 months
[jBPM] - A question on the external event using event Correlation
by byungwoojun
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&cont...]
13 years, 7 months
[jBPM] - Inclusive gateway doesn't support converging direction
by Francesco Pietrobelli
Francesco Pietrobelli [http://community.jboss.org/people/francesco.pietrobelli] created the discussion
"Inclusive gateway doesn't support converging direction"
To view the discussion, visit: http://community.jboss.org/message/606903#606903
--------------------------------------------------------------
Hi,
I have a problem that look like a bug, but before to report the issue i want to know if any other have the same problem.
It seems that inclusive gateway element doesn't supports the "Converging" direction.
To reproduce the problem is sufficent to:
1- create a bpmn2 process with a inclusive gateway with gatewayDirection set to "Converging"
2- create a KnowledgeBuilder and add it
At this point the following Exception is thrown:
java.lang.IllegalArgumentException: Unknown gateway direction: Converging
at org.jbpm.bpmn2.xml.InclusiveGatewayHandler.createNode(InclusiveGatewayHandler.java:34)
at org.jbpm.bpmn2.xml.AbstractNodeHandler.start(AbstractNodeHandler.java:73)
at org.drools.xml.ExtensibleXmlParser.startElement(ExtensibleXmlParser.java:382)
....
I also attach a simple bpmn2 process definition and the relative junit test case.
Cheers,
Francesco
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/606903#606903]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 7 months