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

Rule stopped working after upgrading from 5.6.0 to 6.5.0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 6.5.0.Final
    • core engine
    • None
    • Hide
      1. Clone the Git repository from Github.
      2. Checkout the v5.6.0 version as git checkout v1.0.
      3. Run tests as mvn clean test to see everything working fine with Drools v5.6.0.
      4. Checkout the main line as git checkout master.
      5. Run tests as mvn clean test to see one of the tests failing.
      Show
      Clone the Git repository from Github. Checkout the v5.6.0 version as git checkout v1.0 . Run tests as mvn clean test to see everything working fine with Drools v5.6.0. Checkout the main line as git checkout master . Run tests as mvn clean test to see one of the tests failing.
    • NEW
    • NEW

      I have the following POJO:

      package org.example.domain.purchase;
      
      public class Order {
        private OrderType type;
      }
      

      and the following rules:

      package org.example.domain.purchase;
      
      rule "consignment"
        when
          $order: Order(type.equals(OrderType.CONSIGNMENT))
        then
          System.out.println("Processing consignment order.");
      end
      
      rule "sale"
        when
          $order: Order(type.equals(OrderType.SALE))
        then
          System.out.println("Processing sale order.");
      end
      
      rule "transfer"
        when
          $order: Order(type.equals(OrderType.TRANSFER))
        then
          System.out.println("Processing transfer order.");
      end
      

      These rules work fine with Drools v5.6.0 but do not fire after upgrading to v6.5.0. Even the following simple rule does not fire:

      package org.example.domain.purchase;
      
      rule "order"
        when
          $order: Order()
        then
          System.out.println("Processing an order.")
      end
      

      A sample project is available on Github.

              mfusco@redhat.com Mario Fusco
              manish.in.java Manish Java (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: