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

infinite loop in rule with accumulate, even if the then part does nothing

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

    XMLWordPrintable

Details

    • Hide

      Only one rule:

      rule "test.n3 0"
      when
      $LIST : java.util.List( )
      from accumulate( $Triple_1 : Triple( $CN : subject, predicate == "<http://deductions.sf.net/samples/princing.n3p.n3#number>", $N : object )
      , collectList( $N ) )
      $NUMBER : Number() from accumulate(
      $NUMBER_STRING_ : String() from $LIST
      , sum( Double.parseDouble( $NUMBER_STRING_)) )
      then
      system.out ("test.n3 0 fires");
      end

      Needs to have 3 object asserted:

      new Triple( ( "<CN1>", "<number>", "200" );
      new Triple( ( "<CN2>", "<number>", "100" );
      new Triple( ( "<CN3>", "<number>", "100" );

      The Triple class :

      http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/src/main/java/n3_project/helpers/Triple.java

      Show
      Only one rule: rule "test.n3 0" when $LIST : java.util.List( ) from accumulate( $Triple_1 : Triple( $CN : subject, predicate == "< http://deductions.sf.net/samples/princing.n3p.n3#number >", $N : object ) , collectList( $N ) ) $NUMBER : Number() from accumulate( $NUMBER_STRING_ : String() from $LIST , sum( Double.parseDouble( $NUMBER_STRING_)) ) then system.out ("test.n3 0 fires"); end Needs to have 3 object asserted: new Triple( ( "<CN1>", "<number>", "200" ); new Triple( ( "<CN2>", "<number>", "100" ); new Triple( ( "<CN3>", "<number>", "100" ); The Triple class : http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/src/main/java/n3_project/helpers/Triple.java

    Description

      There is an infinite loop .
      It happens in the addPackage step.
      It happens whatever is in the then part

      Attachments

        Activity

          People

            mfusco@redhat.com Mario Fusco
            jmvanel_jira Jean-Marc Vanel (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

            Dates

              Created:
              Updated:
              Resolved:
              Archived:

              PagerDuty