cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to query for receiveTask

baldy
Champ in-the-making
Champ in-the-making
I have a receive Task in my process model, like so

<receiveTask id="waitForAcknowledgement" />

I know my process is waiting at this task. I'm trying to use

taskService.createTaskQuery().taskDefinitionKey("waitForAcknowledgement").list();

The size of the list returned is 0.

I need to be able to "signal" the task so that my process can transition to my end event. But if I cannot find the task I cannot do that.

Anyone please tell me what I am doing wrong.
2 REPLIES 2

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
the taskservice is for usertasks…

h_ter_schuur
Champ in-the-making
Champ in-the-making
In order to signal the execution should use:
runtimeService.signal(execution.getId());
You can find the executions which are waiting on the waitForAcknowledgement by using:
List<Execution> executions = runtimeService.createExecutionQuery().activityId("waitForAcknowledgement").list();