0
votes

I have a use case where I am using a BPMN parallel multi-instance task to create multiple tasks once a form is submitted. The multi instance task is creating the individual tasks with the variable values. I can also see the element variable value is added to all the tasks.

enter image description here

I am starting the process using REST API. My api request body is

{ "businessKey":"1", "messageName": "start", "processVariables" : { "var1" : {"value" : "1", "type": "string"}, "var2": {"value" : "[\"1\",\"2\",\"3\"]", "type": "Object", "valueInfo" : { "objectTypeName": "java.util.ArrayList", "serializationDataFormat": "application/json" } } } }

However when I try to query the task list using task variables, the api returns empty response. I have checked in both Camunda Tasklist page as well as the API engine-rest/task/{taskId}/variables.

I tried querying for task list using both the GET and POST task list options.

 `GET: /engine-rest/task?processInstanceBusinessKey=1&taskVariables=val_eq_2
    POST: /engine-rest/task
    Body: 
    {
    "processInstanceBusinessKey": "1",
    "taskVariables":
        [{"name": "val",
        "value": "2",
        "operator": "eq"
        }]
    }

Response: []`

If the task variable is present why is the api not returning tasks based on the task variable name?

1

1 Answers