JBoss Community

Re: Persisted human tasks do not trigger workitem complete

created by bpmn2user in jBPM - View the full discussion

Robert,

 

Also please note that task handler connects to the task service using a lazy connection approach.

You, however,  can connect immediately so that you retrieve the task completion events even before the first task is created. To instantiate the listener using this approach you might modifying your code like this:

 

CommandBasedWSHumanTaskHandler taskHandler = new CommandBasedWSHumanTaskHandler(ksession);

ksession.getWorkItemManager().registerWorkItemHandler("Human Task",taskHandler);

taskHandler.connect();

Reply to this message by going to Community

Start a new discussion in jBPM at Community