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
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
1 of 1 people found this helpful
Uwe, 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.
this seems to be simple and efficient, I will try it,
how is it possible from an external mdb to signal the jbpm "wait state"?