I have attached a bpmn file and the two files being used in Java Service Tasks. I start the process and set the form property f1 to asd. Then I hit the query/tasks rest api with the following body: { "assignee": "kermit", "taskDefinitionKey": "ut2", "processInstanceVariables": [ { "name": "questionnaire", "type": "string", "value": "asd", "operation":"equals" } ]
it seems like all 3 tasks are part of the same process-instance. You're actually requesting all tasks that are part of a process-instance which have a variable with name 'questionnaire' set to a certain value. You're querying based on process-variables, not on task-local variables - makes sense you get 3 results if all those 3 tasks are part of such a process…