JBoss Community

Re: How to Send Signal Out from a WorkItemHandler?

created by Kris Verlaenen in jBPM - View the full discussion

You can just pass the reference to the session when creating your handler and registering it.  Something like:

 

StatefulKnowledgeSession ksession = ...

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

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

 

Inside your handler, you can then simply invoke methods on the ksession, like signalEvent(..).

 

Kris

Reply to this message by going to Community

Start a new discussion in jBPM at Community