-
1. Re: jms and jbpm
swiderski.maciej Sep 3, 2010 9:03 AM (in response to uwerasmus)why not using state activity instead? I think it is perfect to put application A process in wait after signaling application B. Once application B is done with its work it will signal back application A to continue with the flow.
About JMS, jBPM 4.4 has support for JMS integration but only outbound traffic, so you shall use another technique to trigger process to continue... For more information about JMS activity take a look at dev guide http://docs.jboss.com/jbpm/v4/devguide/html_single/#jms
-
2. Re: jms and jbpm
uwerasmus Sep 3, 2010 9:20 AM (in response to swiderski.maciej)Actually we are using jbpm 3 with seam 2.2.
The application A is bundled with jBPM, but B is without.
Meanwhile I was able to prepare code that maybe could send JMS message from B to A. If the message itself contains jobId, the JobListenerBean will execute the job. (discovered from source code)
But I have 2 problems.
1. How to get know the jobId itself? (The app B doesn't know that. Maybe it could be somehow handled with app A when creating the job, but that's also something I don't know how..)
2. The A app cannot be deployed, because JmsMessageServiceFactory is not found. I found it's it jbpm-enterprise.jar package and I tried to add it to the .ear as module, that was successfull, but again when deploying, it fails with exception that it cannot find java:/JbpmDS datasource ("type-mapping is not initialized: java:/JbpmDS was not deployed or type-mapping was not configured.") That is correct as I didn't specify any. I would like to specify it, but I don't know, where it should point to. Should it be the same db as used in the app or another?
Thanks for suggestions
Uwe
-
3. Re: jms and jbpm
aguizar Sep 9, 2010 2:33 AM (in response to uwerasmus)1 of 1 people found this helpfulUwe, your design is unnecessarily complex because you are trying to incorporate jBPM internals which are not meant for external usage. I would model the process as follows.
<process-definition name="callback"> <start-state> <transition to="send-mail" /> </start-state> <mail-node name="send-mail"> <transition to="wait-for-callback" /> </mail-node> <state name="wait-for-callback" /> </process-definition>
Once the user performs the work indicated in the email, application B should send a plain message to a queue with a long property set to the token ID. In addition you should code a simple MDB that reads this message, loads the referenced token and signals it. That's all. You should not try to involve JmsMessageServiceFactory.
-
4. Re: jms and jbpm
uwerasmus Sep 29, 2010 8:03 AM (in response to aguizar)Hi,
this seems to be simple and efficient, I will try it,
Thank You
-
5. Re: jms and jbpm
hifly81 Nov 1, 2010 2:31 PM (in response to uwerasmus)how is it possible from an external mdb to signal the jbpm "wait state"?
thanks,
Giovanni