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