Sort Tasks by a Priority Task value

Hi,

We need to sort Task by a priority value assigned to it and it’s Due date.
Is it any way to implement this in flowable Tasks ?
I think a simplier solution that is filter tasks by a Variable ‘priority’ value but it is not as useful as having as an order.

Thanks,

Toni

Hi Toni,

Currently only one order property is supported. But you could use the createNativeTaskQuery method on TaskService to write your own query to return Task instances. We could also have a look to support multiple order properties via the Task API.

Best regards,

Tijs

Hi Toni,

Sorry I was wrong, you can just concatenate multiple order properties to the Task Query, so something like orderByPriority.desc().orderByDueDate.asc();

Best regards,

Tijs

1 Like

Hi Tijs,

Great ! It is the solution to our problem.

Thanks.