What can be the maximum and minimum values that can be assigned as a priority of a task?


#1

I was just wondering what can be the maximum and minimum values that can be assigned as a priority of a task?

Reason: The current rest api allows us to sort the task list based on instanceId, caseInstanceId, dueDate, executionId, caseExecutionId,assignee, created, description, id, name, nameCaseInsensitive and priority.

If I have a variable with value say “1000000” and another with value “-1000000” and I have to sort the list based on those values can they be assigned to priority? Also, is there any other optimal way of sorting the task list using those variables (In REST API)?


#2

Hi,

Task priority is an integer, so the valid values range from Integer.MIN_VALUE to Integer.MAX_VALUE.

It looks like the POST query can also directly sort by process variables: https://docs.camunda.org/manual/7.9/reference/rest/task/post-query/. Maybe this works also for the GET query but is simply not documented.

Cheers,
Thorben