I'm migrating an application from drools 4 to drools 5. I encountered some problems where our decision table uses calls to methods with String parameters in actions cells.
I've reproduces 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 this java and xls file with Drools 4 I get the folloowing at
line 11 of the drl:
m.setMessage(m.getMessage("msg"));update(m);
But 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);
I have attached the java code, xls sheet and both generated drl files.
Thanks in advance.
drools4.drl
Description: Binary data
drools5.drl
Description: Binary data
DecisionTableTest.java
Description: Binary data
Sample.xls
Description: MS-Excel spreadsheet
_______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
