JBoss Community

Re: SyncTaskServiceWrapper registerForEvent

created by Mauricio Salatino in jBPM - View the full discussion

The jbpm-human-task-services is emiting CDI events:

 

All the events are hidden from the regular user that is not interested in them but, because the Human Task WorkItems rely on these events to work you can find an example usage of them here:

 

https://github.com/droolsjbpm/jbpm/blob/master/jbpm-human-task/jbpm-human-task-workitems/src/main/java/org/jbpm/task/wih/ExternalTaskEventListener.java

 

That's the listener which is Observing events that are being emitted by the HT services.

 

All the tests inside the jbpm-human-task-workItems are using these events to notify the session about a task completion/abortion ->

https://github.com/droolsjbpm/jbpm/blob/master/jbpm-human-task/jbpm-human-task-workitems/src/test/java/org/jbpm/task/wih/HTWorkItemHandlerCDITest.java

 

If you debug those tests you will see where the events are being emitted and observed :)

 

Cheers

Reply to this message by going to Community

Start a new discussion in jBPM at Community