Jaber C. Mourad [http://community.jboss.org/people/newbeewan] created the 
discussion

"How to get current task in EventListener ?"

To view the discussion, visit: http://community.jboss.org/message/548295#548295

--------------------------------------------------------------
Hi,

I'm doing some experiments with jbpm 4.4 snapshot.

I have a trouble in an EventListener which was working with jbpm 4.3.

My code :
    @Override
    public void notify(EventListenerExecution execution) throws Exception {
        Task task = 
taskService.createTaskQuery().processInstanceId(execution.getProcessInstance().getId()).uniqueResult();
        if (task == null) {
            logger.warn("No task found for ProcessInstance {}", 
execution.getProcessInstance().getId());
        } else {
            logger.trace("task name {} ; assignee ", 
task.getName(),task.getAssignee());
            execution.createVariable(LAST_TASK_ASSIGNEE, task.getAssignee());
        }
    }


Is there a better way to get the current task in a event listener or it is a 
bug in the trunk ?

Regards

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/548295#548295]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to