Hi I have a servicetask java class which is an implementation of ActivityBehavior and which does not mark itself as completed so I assume the task gets suspended and the process remains at that task. I wish to complete this task from the outside, I have the process id. I tried getting a handle on this task by doing this: List<Task> tasks = taskService.createTaskQuery().processInstanceId(processInstanceId).list();
But the task list is empty. Any idea on how to accomplish this? Thanks in advance.
A service-task id not a user-taks and will therefor NOT be returned by the TaskService query. Also, the process is not suspended when a service-task is encountered, rather it is executed immediately. All non-wating activities are executed until a wait-state has been reached in that execution (user-task, receive-task, process-end).