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

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

    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

              Assignee:
              tirelli Edson Tirelli
              Reporter:
              dsotty Davide Sottara (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: