Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-6647

[DMN XML] Signavio Profile - error when executing multi-instance decisions with multiple levels of decisions inside

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • dmn engine
    • None

      Attached Scenario

      The MID takes a list of names.

      Inside of the MID, for each name, we first calculate the length of the name string, then multiply it by 2.

      In the end, we sum up all the results from the MID.

      Example: Input is a list ["John", "Alice"], and expected result would be (4*2) + (5*2) = 18

      Actual Behavior

      An error is logged, showing that the middle-level decision inside of the MID ("toNumber") cannot access the iterator variable.

       

      Ideas

      We've tried to debug a bit already, but didn't find a definitive solution.

      An error we encountered was that the MID can be compiled before it's inner decisions. If this happens, then we don't know the dependencies of the inner decisions yet. So the getDependencies() inside of recurseNodeToRemoveItAndDepsFromModelIndex returns an empty collection, which means the middle-level decision will not be removed from the model index.
      Still, when we manually moved the MID to the bottom of the XML, we could watch the middle-level decision be removed, and we still encountered the error.

        1. SumLenghtOfNames(times 2).dmn
          7 kB
          Jonas Beyer
        2. screenshot-1.png
          85 kB
          Matteo Mortari
        3. Screenshot 2021-10-11 at 17.16.16.png
          36 kB
          Jonas Beyer
        4. MID with multiple inside decisions.dmn
          5 kB
          Jonas Beyer
        5. MID with multiple inside decisions.txt
          0.1 kB
          Jonas Beyer
        6. MID with multiple inside decisions.png
          36 kB
          Jonas Beyer
        7. MID with multiple inside decisions.sgx
          1.02 MB
          Jonas Beyer
        8. MID with outside requirement.dmn
          8 kB
          Jonas Beyer
        9. MID with outside requirement.PNG
          34 kB
          Jonas Beyer
        10. MID with outside requirement.txt
          0.1 kB
          Jonas Beyer
        11. MID with outside requirement.sgx
          224 kB
          Jonas Beyer
        12. 0001-DROOLS-6647-only-remove-inner-dependencies-of-an-MID.patch
          23 kB
          Tommy Neubert

              mmortari@redhat.com Matteo Mortari
              jonas.beyer Jonas Beyer (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: