Although it's a bug fix release, we've added a nice new query capability for process instances and tasks, an OR statement. Now you can query for process instances and tasks using one chain of OR statements using our query API. It can be used like this:
But you can of course also mix with AND statements like:
This will result in a query like:
WHERE task.name like '%Test%' AND (task.owner = 'kermit' OR task.assignee = 'kermit')
Current limitations of the or construct are:
- You can use only one chain of OR statements right now. So you can't use the or and endOr methods more than once.
- You can use a specific field only once in an OR statement, so you can't use processDefinitionId twice in an OR statement for example. Only the second value will be used in that case.
We welcome any feedback and suggestions on this new query API option. If we get positive feedback, it will be added to more query APIs for the next release. Enjoy!