Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-2423

"from" does not work correctly with events in STREAM mode

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    Description

      In the simple test case below, Message is an instantaneous event (i.e. duration = 0) with a list of destinations.
      --------------------------------------------------------------------------------------------------------------------------------------
      declare Message
      @role( event )
      @timestamp(start)
      @duration(duration)
      end

      rule "Hello World"
      when
      m : Message( status == Message.HELLO, $myMessage : message, $destinations : dest)
      $s : String() from $destinations
      then
      System.out.println( "Dear " + $s + " : >>> " + $myMessage );
      end
      --------------------------------------------------------------------------------------------------------------------------------------

      if the engine is configured to work in STREAM mode, the output is
      Dear NULL :>>> Hello World
      ...
      since the Strings extracted from the Collection "dest" have already been retracted by
      the time the rule is fired, following the retraction of the Message event.
      The problem does not show in CLOUD mode.

      Attachments

        Issue Links

          Activity

            People

              etirelli@redhat.com Edson Tirelli
              dsotty Davide Sottara (Inactive)
              Archiver:
              rhn-support-ceverson Clark Everson

              Dates

                Created:
                Updated:
                Resolved:
                Archived:

                PagerDuty