When testing a process, I want to select a task by variables that are defined in parent (but not the root) scope. E.g. if I test a multi-instance user task, I want to select a task by the value of its loop counter or element variable.
Currently I can only filter for variables on any and task-local level, e.g.
In the multi-instance use case, this code matches all available tasks.
- In assert, there is an extension that allows to filter for tasks with a variable value in their parent execution hierarchy.
- Note that the scope of this feature request is to extend Camunda BPM Assert, not the task query. Filtering for variables in a hierarchy is not possible to express with standard SQL due to the recursive nature of the data. While recursive SQL constructs exist, they are no supported on all our databases afaik.
- Since test assertions are not performance critical, it is ok to do multiple queries and filter results in Java (e.g. selecting the execution hierarchy, and then fetching and matching variables on Java side)