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

A query after an eval inside an OR causes a ClassCastException

XMLWordPrintable

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

      A query after an OR containing an eval on one of its branch, like in the following DRL, causes a ClassCastException

      declare Holder
        str : String
      end
      
      declare Bean
        val : String
      end
      
      declare Mock end
      
      rule "Init"
      when
      then
        insert( new Bean( "xyz" ) );
        insert( new Holder( "xyz" ) );
        insert( new Mock() );
      end
      
      query mock( Mock $m ) $m := Mock() end
      
      rule "Check"
      when
       $b : Bean( $t : val )
        ( Holder( $t ; ) or eal( $t.startsWith( "abc" ) ) )
        mock( $m ; ) 
      then
        System.out.println( $m );
      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: