JBoss Community

Re: How to access a processInstance within a work item

created by Tihomir Surdilovic in jBPM - View the full discussion

Hi, you can pass the session to the handler and register it. For example:

 

CustomerServiceTaskHandler handler = new CustomerServiceTaskHandler(ksession, ......);

ksession.getWorkItemManager().registerWorkItemHandler("myServiceTaskHandler", handler);

 

In the handler then you can invoke methods on the ksession, like in your example the signalEvent() method.

Hope this helps.

Reply to this message by going to Community

Start a new discussion in jBPM at Community