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

[Guided Decision Table] DSL can not contain $ in the definition

XMLWordPrintable

    • 2018 Week 03-04
    • Hide
      1. Open workbench
      2. Import the example project
      3. Open the pricing loans table
      4. Add BRL condition fragment that will use the DSL sentence: When the credit rating is {rating}
      5. Tick new checkboxes in table cells and check the source code. There will be something like: applicant:Applicant(creditRating=="AA")
      6. Save and close the table
      7. Open the ApplicantDsl file
      8. Do the change below:
        • Replace: When the credit rating is {rating:ENUM:Applicant.creditRating}
        • With: When the credit rating $r is {rating:ENUM:Applicant.creditRating}
      9. Save the file
      10. Open again the Pricing loans decision table
      11. Check the source code
      12. There will be something like: When the credit rating is AA
      Show
      Open workbench Import the example project Open the pricing loans table Add BRL condition fragment that will use the DSL sentence: When the credit rating is {rating} Tick new checkboxes in table cells and check the source code. There will be something like: applicant:Applicant(creditRating=="AA") Save and close the table Open the ApplicantDsl file Do the change below: Replace: When the credit rating is {rating:ENUM:Applicant.creditRating} With: When the credit rating $r is {rating:ENUM:Applicant.creditRating} Save the file Open again the Pricing loans decision table Check the source code There will be something like: When the credit rating is AA
    • NEW
    • NEW

      The DSL sentences are defined like:

      • [when] definition = real rule

      If the definition contains $ character, then the DSL sentence can not be used properly in the guided decision table.

            manstis@redhat.com Michael Anstis
            rh-ee-jomarko Jozef Marko
            Jozef Marko Jozef Marko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: