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

Guided Decision Table editor does not allow proper operators after editing a BRL clause

XMLWordPrintable

    • Hide

      Create a simple model that includes one class with at least one Long field.
      Create a Guided Decision Table.
      Add a Condition column using a BRL fragment
      Add a clause to the BRL that checks the Long field
      Select "greater than or equal to" as the operator
      Select Literal Value or Formula
      Enter 0
      Click Ok
      Add a row and select the checkbox for that row
      Save
      Close the decision table editor
      Open the decision table rule you created
      View the source (there should be a >= comparison in there)
      Edit the BRL condition you created
      The operator will be reset to "--- please choose ---"

      Show
      Create a simple model that includes one class with at least one Long field. Create a Guided Decision Table. Add a Condition column using a BRL fragment Add a clause to the BRL that checks the Long field Select "greater than or equal to" as the operator Select Literal Value or Formula Enter 0 Click Ok Add a row and select the checkbox for that row Save Close the decision table editor Open the decision table rule you created View the source (there should be a >= comparison in there) Edit the BRL condition you created The operator will be reset to "--- please choose ---"

      When editing an existing BRL condition column in the guided rule editor, condition clauses in the BRL that compare using relational operators (i.e. <, >, etc.) for Long values (maybe other numerics as well) are reset to "--- please choose ---". The choices then given are only ==, !=, == NULL, and != NULL.

      The choices should be the same as when I first selected "greater than or equal to" or the like, and should retain the value I originally set. Looking at the source tab, I still see the > value. This happens with both Literal and Formula entries (didn't try others). When initially editing the rule, this bug does not appear. However, after closing the editor and opening the rule in the decision table editor again, it happens consistently.

      Looking at the .gdst file for the rule, I see that the <operator> tag for the column in question is >= in order to escape the XML tag trigger. This may be a factor in what is causing this bug. In my production environment, I am not able to make the decision table rule fire.

      If I copy the source from the decision table editor's source tab into a pure DRL rule, the DRL rule fires just fine given the same input.

              karreiro_ Guilherme Gomes (Inactive)
              devyndraen Stephen Slaboda (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: