[jboss-user] [jBPM] - Async service task questions

Calvin Chu do-not-reply at jboss.com
Mon Oct 1 17:47:10 EDT 2012


Calvin Chu [https://community.jboss.org/people/calvinchu101] created the discussion

"Async service task questions"

To view the discussion, visit: https://community.jboss.org/message/762604#762604

--------------------------------------------------------------
I am playing around jBPM 5.3.0.Final in pass weeks, I am working on a simple demo that jBPM to start an external ETL process by JMS. When the external process are done, a JMS message is sent back to the server to feedback the result and finish the process in jBPM. I am using jBPM-console to start the process.

I have developed my WorkItemHandler to send the JMS message, and I didn't call the workItemMgr.completeWorkItem(workItem.getId(), map) ; in my executeWorkItem() method. I am expecting this would keep the process in wait state and the process would be completed by a MDB listening the response JMS message from external process.

The problem I have now is I am not able to restore the session in my MDB to complete the process. From other threads I get the idea to call JPAKnowledgeService.loadStatefulKnowledgeSession() with the session id  and then complete the work item by ksession.getWorkItemManager().completeWorkItem(). However, from my WorkItemHandler executeWorkItem(WorkItem workItem, WorkItemManager workItemMgr) I am not able to get the session Id, also, I registered my handler through jBPM-console, it seems like that I am not able to pass the session id from the constructor as well.

So can some experts give me some advise on how to get the session id and how to complete the jBPM task in my MDB ? And what is the best way to have external process to acknowledge jBPM for task completion ? Thanks!
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/762604#762604]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20121001/7e5cfb97/attachment.html 


More information about the jboss-user mailing list