Tasks are instantiated multiple times when a previous Stage is repeated

XMLWordPrintable

    • Type: Bug Report
    • Resolution: Won't Fix
    • Priority: L3 - Default
    • None
    • Affects Version/s: 7.6.0-alpha6
    • Component/s: engine
    • None

      Testing of Camunda BPM 7.6.0-alpha6 has highlighted a change in the way that Tasks are instantiated as the result of the repetition of a previous stage.

      I've attached a test (source code available here) to highlight the issue. It uses a CMMN model (attached an image, and the cmmn to this issue). The test shows that if the Case is instantiated, and Tasks are completed in such a way that the Case transitions from New -> Content Review -> Rework -> Content Review -> Manager Review then two instances of each of the Tasks contained within that Stage are created.

      When this test is run against Camunda 7.5.0, this is not the case. Only 1 "Review" task is created when we move into the Manager Review stage, so the issue has been introduced during the 7.6.0-alpha releases.

      It appears that the Manager Review stage itself is being activated twice. To highlight this, the test can be run in a second mode where the Case will move from New -> Content Review -> Manager Review. In this second mode, only 1 instance of the Review task is created when we reach the Manager Review stage. This suggests that the repetition of the "Content Review" is contributing to the problem.

      To execute the test and highlight the issue, run :

       java -jar .\camunda-upgrade-issue-1.0-SNAPSHOT.jar 

      To execute the test in the second mode (going straight to Manager Review after visiting Content Review) run :

       java -jar .\camunda-upgrade-issue-1.0-SNAPSHOT.jar  sendDirectlyForManagerReview

      Each of these tests will write out the number of active Tasks found when the Case enters the Manager Review stage, and will print their names to standard out, e.g

      There are 2 active Tasks
      Name = PlanItem_ManagerReview_Review
      Name = PlanItem_ManagerReview_Review
      

        This is the controller panel for Smart Panels app

          1. ContentAuthoring.cmmn11.xml
            27 kB
            Scott Mackie
          2. TaskInstantiation.PNG
            46 kB
            Scott Mackie

              Assignee:
              Roman Smirnov
              Reporter:
              Scott Mackie
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: