[jboss-user] [jBPM] - Re: How to complete custom Work Item Handler

Sukumaran Raghavan do-not-reply at jboss.com
Sat Apr 28 02:20:43 EDT 2012

Sukumaran Raghavan [https://community.jboss.org/people/suku_1983] created the discussion

"Re: How to complete custom Work Item Handler"

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


I had a similar scenario. I took the following approach. 

 - I created my own DB table for my CustomWorkItemHandler. i maintained the Session ID, Process Instance ID, WorkItem ID, and state (as needed by you). Everytime the workitemhandler is executed, it will update the DB table . Note that it DOES not complete or abort the work item. 
 - In my case i had an external event to complete the work item. Upon receipt of the event, i loaded the persisted ksession, then performed a completeWorkitem for the specific work item ID. I got the work item ID as part of the external event. 

This is basically how the Human task works. I had picked the idea from there. HumanTask however is much more complex; while this is a much more simple case.

Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120428/ffe63364/attachment-0001.html 

More information about the jboss-user mailing list