Does this scenario involve JBoss ESB? For getting a response back to JBoss ESB, I'd take a look at the bpm_orchestration4 quickstart and section 5.6 of the Services Guide.
If this scenario does not involve ESB, you may want to pose your questions to the jbpm forum or if you have a support contract (you mentioned you are working with the SOA Platform) you may want to run a support case through.
Yes this does involve Jboss ESB.Ok here is the scenario
I am sending a JMS message from my jruby program to the queue on jboss esb which starts the jbpm .
Now I need to get the response back from ESB to my external jruby program .The response would be ESB message.Also I need to keep track of the process states so that next time I should be able to resume my process where I left from external jruby application.
Is there any way for doing this ?
You could look at ServiceInvoker.deliverSync, though I'm not sure it would work in this situation. Maybe you could look at the ESB notifying a queue or a database table or a file and then do some polling within your JRuby app?