Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assert: I can find a task by a variable in its parent scope hierarchy #2450

Open
ThorbenLindhauer opened this issue Jul 17, 2020 · 0 comments
Labels
scope:assert Changes to the Assert library. type:feature Issues that add a new user feature to the project.

Comments

@ThorbenLindhauer
Copy link
Member

This issue was imported from JIRA:

Field Value
JIRA Link CAM-12178
Reporter NYBzR2x
What is this name? This pseudonym name was generated based on the user name in JIRA to protect the personal data of our JIRA users. You can use this identifier to search for issues by the same reporter.
Has restricted visibility comments false

Component

https://github.com/camunda/camunda-bpm-assert/

User story

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.
 
Background

Currently I can only filter for variables on any and task-local level, e.g.

TaskQuery taskQuery = taskQuery().processVariableValueLike("belegId", "ID-1");
task = task(taskQuery);

In the multi-instance use case, this code matches all available tasks.

Acceptance Criteria

  • In assert, there is an extension that allows to filter for tasks with a variable value in their parent execution hierarchy.

Implementation hints

  • 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)

Links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:assert Changes to the Assert library. type:feature Issues that add a new user feature to the project.
Projects
None yet
Development

No branches or pull requests

1 participant