Uploaded image for project: 'Red Hat Decision Manager'
  1. Red Hat Decision Manager
  2. RHDM-1369

The collect/accumulate function with expired event is sensible to the order of inserted events

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.7.1.GA
    • Fix Version/s: None
    • Component/s: BRE
    • Labels:
      None

      Description

      If the function collect/accumulate is used in the beta node(left constraint) with expired event, it's sensible to the order of events being inserted, which should not. This issue didn't happen in bpms 6.4. It occurs in rhdm 7.x.
      For example:

      "import " + DummyEvent.class.getCanonicalName() + "\n" +
      "import " + OtherEvent.class.getCanonicalName() + "\n" +
      "import " + HashSet.class.getCanonicalName() + "\n" +
      "declare DummyEvent " +
      "@role( event ) " +
      "@timestamp( eventTimestamp )\n" +
      "@expires(0ms)" +
      "end\n" +
      "declare OtherEvent " +
      "@role( event ) " +
      "@timestamp( eventTimestamp )" +
      "@expires(2d)" +
      "end\n" +
      "rule R0 when\n" +
      " $d: OtherEvent() \n" +
      " $r: HashSet ( size >= 2 ) from collect (DummyEvent())\n" +
      "then\n" +
      " System.out.println(\"R0 Fired\");" +
      "end";

      If you insert events like:
      ksession.insert( other);
      ksession.insert( dummyEvent0 );
      ksession.insert( dummyEvent1);

      The rule gets fired. But if you inserts the events like:

      ksession.insert( dummyEvent0 );
      ksession.insert( other);
      ksession.insert( dummyEvent1);

      The rule doesn't get fired.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  mfusco Mario Fusco
                  Reporter:
                  ghjboss Gary Hu
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: