Uploaded image for project: 'Guvnor'
  1. Guvnor
  2. GUVNOR-2687

Guided Decision Table: Only a single negate Pattern shown when multiple defined

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.0.0.Beta1
    • Fix Version/s: 7.0.0.Beta2
    • Component/s: None
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      1. Create the data objects COPPER, FIBER and COAX in a project.
      2. Create a Guided Decision Table and added the columns for the conditions following the below steps:

      --> COPPEROBJECT : COPPER( maxSpeedDown < 5000 , maxSpeedUp < 100000000 )
      a. Add a New column
      b. Add a simple Condition
      c. Select "Pattern" and create a new fact pattern:
      Fact type -> COPPER
      Binding -> COPPEROBJECT
      d. Select Literal value
      e. Select Field "maxSpeedDown"
      f. Select operator -> "less than"
      g. Write a column header description
      h. Add a New column
      i. Add a simple Condition
      j. Select "Pattern" and select "COPPER [COPPEROJECT]"
      k. Select Literal value
      l. Select Field "maxSpeedUp"
      m. Select operator -> "less than"
      n. Write a column header description

      --> not FIBER( )
      a. Add a New column
      b. Add a simple Condition
      c. Select "Pattern" and create a new fact pattern:
      Fact type -> FIBER
      Binding -> NOTFIBER
      Negate patter match: check
      d. Select Literal value
      e. Select field "this"
      f. Select operator -> (no perator)
      g. Write a column header description

      --> not COAX( )
      a. Add a New column
      b. Add a simple Condition
      c. Select "Pattern" and create a new fact pattern:
      Fact type -> COAX
      Binding -> NOTCOAX
      Negate patter match: check
      d. Select Literal value
      e. Select field "this"
      f. Select operator -> (no perator)
      g. Write a column header description

      3. Add a column for the action following the below steps:

      --> System.out.println("Row 55 ProductionRuleEngine");
      a. Add a New column
      b. Check "Include advanced options"
      c. Add an action BRL fragment
      d. Write a column header description
      e. Click plus icon
      f. Add free form DRL
      g. Write -> System.out.println("Row 55 ProductionRuleEngine");

      4. Add a row and put whatever value in every column.

      When we look at the source code, we only can see the following:

      ~~~
      rule "Row 55 ProductionRuleEngine"
      dialect "mvel"
      when
      COPPEROBJECT : COPPER( maxSpeedDown < 5000 , maxSpeedUp < 100000000 )
      not FIBER( )
      then
      System.out.println("Row 55 ProductionRuleEngine");
      end
      ~~~

      Show
      1. Create the data objects COPPER, FIBER and COAX in a project. 2. Create a Guided Decision Table and added the columns for the conditions following the below steps: --> COPPEROBJECT : COPPER( maxSpeedDown < 5000 , maxSpeedUp < 100000000 ) a. Add a New column b. Add a simple Condition c. Select "Pattern" and create a new fact pattern: Fact type -> COPPER Binding -> COPPEROBJECT d. Select Literal value e. Select Field "maxSpeedDown" f. Select operator -> "less than" g. Write a column header description h. Add a New column i. Add a simple Condition j. Select "Pattern" and select "COPPER [COPPEROJECT] " k. Select Literal value l. Select Field "maxSpeedUp" m. Select operator -> "less than" n. Write a column header description --> not FIBER( ) a. Add a New column b. Add a simple Condition c. Select "Pattern" and create a new fact pattern: Fact type -> FIBER Binding -> NOTFIBER Negate patter match: check d. Select Literal value e. Select field "this" f. Select operator -> (no perator) g. Write a column header description --> not COAX( ) a. Add a New column b. Add a simple Condition c. Select "Pattern" and create a new fact pattern: Fact type -> COAX Binding -> NOTCOAX Negate patter match: check d. Select Literal value e. Select field "this" f. Select operator -> (no perator) g. Write a column header description 3. Add a column for the action following the below steps: --> System.out.println("Row 55 ProductionRuleEngine"); a. Add a New column b. Check "Include advanced options" c. Add an action BRL fragment d. Write a column header description e. Click plus icon f. Add free form DRL g. Write -> System.out.println("Row 55 ProductionRuleEngine"); 4. Add a row and put whatever value in every column. When we look at the source code, we only can see the following: ~~~ rule "Row 55 ProductionRuleEngine" dialect "mvel" when COPPEROBJECT : COPPER( maxSpeedDown < 5000 , maxSpeedUp < 100000000 ) not FIBER( ) then System.out.println("Row 55 ProductionRuleEngine"); end ~~~
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Add a condition BRL fragment.

      Show
      Add a condition BRL fragment.
    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      We are trying to achieve rules similiar to the following through a "Guided Decision Table":

      ~~~
      rule "Row 55 ProductionRuleEngine"
      dialect "mvel"
      when
      COPPEROBJECT : COPPER( maxSpeedDown < 5000 , maxSpeedUp < 100000000 )
      not FIBER( )
      not COAX( )
      then
      System.out.println("Row 55 ProductionRuleEngine");
      end
      ~~~

      When we try to add some columns for those conditions, add a row and put whatever value in every column, only the first negate condition appears in the source code of rule engine. Moreover when you try to add a simple condition and try to select a "Pattern", only one negate pattern appears in the combo.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  manstis Michael Anstis
                  Reporter:
                  manstis Michael Anstis
                  Tester:
                  Jan Hrcek
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: