Uploaded image for project: 'JBoss BRMS Platform'
  1. JBoss BRMS Platform
  2. RHBRMS-2589

Only a negate pattern showed when a new fact pattern is created in a Guided Decision Table

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • 6.2.0.GA, 7.0.0.GA
    • Business Central
    • None
    • Workaround Exists
    • Hide

      Add a condition BRL fragment.

      Show
      Add a condition BRL fragment.
    • 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 ~~~

    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.

      Attachments

        Activity

          People

            manstis@redhat.com Michael Anstis
            rhn-support-omolinab Oscar Molina
            Archiver:
            rhn-support-ceverson Clark Everson
            Jan Hrcek Jan Hrcek (Inactive)
            Jan Hrcek Jan Hrcek (Inactive)

            Dates

              Created:
              Updated:
              Resolved:
              Archived:

              PagerDuty