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

Cannot use null as value for a positional constraint

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 5.5.1.Final, 6.0.0.Alpha9
    • None
    • None
    • None

      The following DRL generates an infinite loop, while it works correctly if you replace the positional constraint with a normal one as in the commented pattern.

      declare Outer
      end
      
      declare Inner
        outer : Outer
      end
      
      rule "Init"
      when
      then
        insert( new Inner( null ) );
        insert( new Outer( ) );
      end
      
      rule "Bind"
      when
        $o : Outer(  )
        $i : Inner( null ; )    // $i : Inner( outer == null )
      then
        modify ( $i ) { setOuter( $o ); }
      end
      

            mfusco@redhat.com Mario Fusco
            mfusco@redhat.com Mario Fusco
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: