JBoss Community

Re: How can i get the task id ?

created by Maciej Swiderski in jBPM - View the full discussion

you need to register for events using taskService.registerForEvent method. So in your case it should be something like this

 

        TaskAddedHandler eventResponseHandler = new TaskAddedHandler (...);

        TaskEventKey key = new TaskEventKey(TaskCreatedEvent.class, -1);

        sTaskService.registerForEvent(key, false, eventResponseHandler);

 

please note this is pseudo code so needs to be slightly adjusted

 

HTH

Reply to this message by going to Community

Start a new discussion in jBPM at Community