Community

Getting the assignee from the last activity

reply from C. Mourad Jaber in jBPM - View the full discussion

Hum thanks, it works !

 

...
    public void notify(EventListenerExecution execution) throws Exception {
        TaskService taskService = processEngine.getTaskService();
        Task task = taskService.createTaskQuery().processInstanceId(execution.getProcessInstance().getId()).uniqueResult();
        if(task != null){
            execution.createVariable("lastAssignee", task.getAssignee());
        }
        
    }
...

 

I don't know if it will work every time, is there an other possibility to get the current task ?

 

Regards

Reply to this message by going to Community

Start a new discussion in jBPM at Community