[jboss-user] [jBPM] - Re: Commit transaction after each service task?

Richard Evans do-not-reply at jboss.com
Mon Jun 18 13:34:03 EDT 2012


Richard Evans [https://community.jboss.org/people/r3vans] created the discussion

"Re: Commit transaction after each service task?"

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

--------------------------------------------------------------
That looks really promising, thanks, Mauricio.

This is the sort of thing you mean?

public void executeWorkItem(final WorkItem workItem, final WorkItemManager manager) {
    new Thread(new Runnable() {

        public void run() {

 *// Do it here* *          * 

            manager.completeWorkItem(workItem.getId(), results);
        }

    }).start();
}

I presume that in the new thread I'll have to re-instantiate the task in a new transaction based on it's id. Is that correct? I'm new to the jbpm api and am googling away for a good example but a steer would be most welcome if you can provide it!

Thanks,
Richard
--------------------------------------------------------------

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

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/20120618/04b5b10a/attachment-0001.html 


More information about the jboss-user mailing list