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

Activation.getObjectsDeep() should include "exists" elements too

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 7.0.0.Beta8
    • 7.0.0.Beta6
    • core engine
    • None
    • NEW
    • NEW

      Give them a finger and they'll want a hand. Give them a hand and they'll want an arm. (dutch proverb)

      The Activation.getObjectDeeps() method introduced for DROOLS-1470 that also includes the accumulates elements, should also include the exists elements. For example:

        when
          $c : Computer(id = "c1")
          exists Process(computer == $c)
        then ...
      

      with this data

        Computer c1;
        Computer c2;
        Computer c3;
        Process pA = new Process(c1);
        Process pB = new Process(c2);
        Process pC = new Process(c1);
        Process pD = new Process(c3);
      

      gives this result

        activation.getObjectsDeep() // includes c1, pA and pC.
      

      The goal is to identify all objects that matched when this rule got fired. In a negative score rule, all those objects are to blame and by focusing to change any of those, it's more likely to improve the overall solution.

            mfusco@redhat.com Mario Fusco
            gdesmet@redhat.com Geoffrey De Smet (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: