Please need help
Is it possible to GET task list which is sorted by a processVariable?
When I execute the list of tasks by filtering on processVariable, I get an error that has no message. Attached are the screenshots
Hi @thomey, welcome to the Camunda Forum!
In the official Rest-Docs you can find all the available Camunda’s REST-APIs.
To query for tasks via Get List (POST) filtered by a certain process variable you have to define the processVariables
parameter in the request body, especially when you want to sort by it, following the parameter instructions:
Array of objects or null (VariableQueryParameterDto)
A JSON array to only include tasks that belong to a process instance with variables with certain values. The array consists of JSON objects with three properties
name
,operator
andvalue
.name
is the variable name,operator
is the comparison operator to be used andvalue
the variable value.value
may be of typeString
,Number
orBoolean
. Validoperator
values are:eq
- equal to;neq
- not equal to;gt
- greater than;gteq
- greater than or equal to;lt
- lower than;lteq
- lower than or equal to;like
;notLike
.key
andvalue
may not contain underscore or comma characters.
Which could look like this for your variable Identifiant
.
// Body
{
"processVariables": [
{
"name": "Identifiant",
"operator": "eq"
"value": "CM202312000000117"
},
],
// your sorting instructions..
}
Hope it helps!