This whitepaper explains how flexible and “legal” queries can be built with the BPM REST API to retrieve lists of tasks and process instances – What’s Inside:
using only supported mechanisms. When used to their full capabilities, those queries can result in “WHERE” clauses containing an arbitrary number of ANDed and ORed nested conditions.