Question

I am using Drools with spreadsheets and I want the user to be able to add complex code in the condition cells. But for some reason this isn't working.

Here's an example:

Example

The code in the condition cell is valid, but I get the following exception from the Drools compiler:

[17,0]: [ERR 102] Line 17:0 mismatched input ''
[11,330]: [ERR 101] Line 11:330 no viable alternative at input 'partnumber' in rule "CAS_12"

I hope you guys can help me.. Thanks!


[Update]

I found the solution for my problem: after setting the EscapeQuotes property to false, the text in the condition-cells is forwarded as it is to the eval function. This way I can programm using DRL inside the cells.

This is how to set the property:

enter image description here

Was it helpful?

Solution

I just found the solution:

All I had to do, was to add EscapeQuotes=false to the decision tables properties. This way, the " aren't escaped by Drools and the text entered in the condition cell will be used as it is.

Thanks for your help anyway!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top