Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-12178

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

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: L3 - Default L3 - Default
    • None
    • None
    • assert
    • None

      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)

        This is the controller panel for Smart Panels app

            [CAM-12178] Assert: I can find a task by a variable in its parent scope hierarchy

            Andre created issue -
            Thorben Lindhauer made changes -
            Summary Original: I can test multi instance elements easily New: Assert: I can find a task by a variable in its parent scope hierarchy
            Thorben Lindhauer made changes -
            Description Original: *User story*

            When testing a process, I can use process variables to easily find a task instance in its scope hierarchy. 

             

            *Background*

            Testing that a process variable has a specific value with

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

            can result in more than one results if variables belong to a process instance and not to a task.

            *AC*
             * tbd
            New: *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.

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

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

            *AC*

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

            *Side notes*

            * 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)
            Thorben Lindhauer made changes -
            Mentioned Roles
            Thorben Lindhauer made changes -
            Mentioned Groups
            Thorben Lindhauer made changes -
            Component/s New: assert [ 14065 ]
            Thorben Lindhauer made changes -
            Labels New: hacktober
            Thorben Lindhauer made changes -
            Description Original: *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.

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

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

            *AC*

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

            *Side notes*

            * 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)
            New: *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.

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

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

            *AC*

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

            *Side notes*

            * 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)
            Thorben Lindhauer made changes -
            Mentioned Roles
            Thorben Lindhauer made changes -
            Mentioned Groups
            Thorben Lindhauer made changes -
            Description Original: *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.

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

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

            *AC*

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

            *Side notes*

            * 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)
            New: *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.

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

            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.

            *Side notes*

            * 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)
            Thorben Lindhauer made changes -
            Mentioned Roles
            Thorben Lindhauer made changes -
            Mentioned Groups

              Unassigned Unassigned
              andre.bappert Andre
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: