Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-2409

Quotes should not be escaped when parsing a decision table

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

    XMLWordPrintable

Details

    Description

      Since drools 5 quotes that are in an action cell of a decision table are escaped. As we are using method calls with String parameters in our action cells this results in invalid drl.

      I've reproduced the issue in the example decision table project generated
      by the eclipse plugin. After generating a new Drools project with decision
      table example I added the following to the Message class:

      public String getMessage(String dummy) {
      return this.message;
      }

      In the decision table I change cell E9 from
      'm.setMessage("$param");update(m);' to 'm.setMessage($param);update(m);'
      and cell E11 from 'Goodbye cruel world' to 'm.getMessage("msg")'.

      When I use Drools 5 I get escaped double-quotes which causes an error
      in com.sample.DecisionTableTest.readKnowledgeBase:
      m.setMessage(m.getMessage(\"msg\"));update(m);

      Version 4.0.7 did not escape quotes and correctly generated the drl:
      m.setMessage(m.getMessage("msg"));update(m);

      I found out that escaping of quoted has been added by request, JBRULES-1811. Please reconsider the decision and or implementation made to solve that issue. Possibly add a keyword to the decision table to define the way qoutes are parsed? Like Sequential for salience....

      The forum entry I have made includes the files and full drl. Please contact me if you need more information or help.

      Attachments

        Activity

          People

            manstis@redhat.com Michael Anstis
            Jospfh Jos Hendriks (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

            Dates

              Created:
              Updated:
              Resolved:
              Archived:

              PagerDuty