cancel
Showing results for 
Search instead for 
Did you mean: 

Can activiti start new process from TaskListener?

targaryenj
Champ in-the-making
Champ in-the-making
i have this code in a complete taskListener,it won't work.

ProcessInstance processInstance = runtimeService.startProcessInstanceById(latestProcessDefinition.getId(),
                    projectId + latestProcessDefinition.getId(), variablesMap);
            List<Task> task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).list();


1 REPLY 1

vasile_dirla
Star Contributor
Star Contributor
Hi,
I don't see a reason why it should not work if all the parameters are passed with the correct values.
Can you write a simple unit test to show what's not working ? (any exceptions… etc…)