Queries with nested ANDs/ORs inside ORs in the Java API

Hi gurus,
We’re uing the Java API to do complex queries (for example using HistoricTaskInstanceQuery).
We want to use or() and endOr() operators but to express AND conditions inside.

For example: (Condition1 OR (Condition2 AND Condition3))

Any way to express this without going to native queries?

Best regards.


The current query api allows you to do queries like (Condition1 OR Condition2) AND Condition3. The query format you are looking for is currently not supported. What you could do however is to use the native query option (createNativeHistoricTaskInstanceQuery on the HistoryService), to write the query you need in sql.

Best regards,