We are using the camunda engine embedded within a Java application, and we use several of the BPMN features including UserTasks.
Our application takes full control of all tasks, so we do not assign them to any user in the BPMN itself. When we start a process containing such a UserTask, the task seems to be activated correctly (and the process is suspended, without any errors). But we are having trouble completing the waiting task from our application via the API.
We use the following strategy to interwork with Java: a listener attached at the entry point of every UserTask records its id (de.getActivityInstanceId
), and then we execute taskService.complete(...)
, passing in the id captured at the entry-point, to enable process execution to continue.
But this strategy is not working for completing the UserTasks. The process engine complains that Cannot find task with id User-Activity:c5fc9d65-9bea-11e9-b89a-503eaa34ab97: task is null
What are we missing?
Thanks for any help with this.