Hello all,
Is it possible to define the follow rule in a decision table :
rule "Activate Promotion"
        when
                l : Line( )
                not ( Promotion ( code == "HOTBUY" ) from l.promos )
        then
         #do some action
end
The rule above works perfectly for what I need when defined in a rule file. However, when I try to define it in a decision table so that the 'code' can be feed from a spreadsheet, I use the following values in the rules cells :
RuleTable          HOTBUYS
CONDITION         ACTION
l : Line        
not ( Promotion ( code == "$param" ) from l.promos )         System.out.println("$param added");
PROMOTION PROMOTION
HOTBUY BESTBUY
I'm getting the following parser errors
[10,17]: [ERR 101] Line 10:17 no viable alternative at input 'Promotion' in rule "_11" in pattern Line
[10,29]: [ERR 101] Line 10:29 no viable alternative at input 'code' in rule "_11"
[10,63]: [ERR 102] Line 10:63 mismatched input ')' expecting 'then' in rule "_11"
java.lang.IllegalArgumentException: Could not parse knowledge.
        at com.sample.DecisionTableTest.readKnowledgeBase(DecisionTableTest.java:85)
        at com.sample.DecisionTableTest.main(DecisionTableTest.java:28)
Also in Eclipse IDE, I get the following error :
"Unknown error while parsing. This is a bug. Please contact the Development team."         NewPromotions.xls
Is it possible to use 'from' conditional element in decision tables ? If so, what am I doing wrong. If not, then what's the best approach to implement the rule above in a decision table.
I'm running Drools 5.1.0M1 in Eclipse.
Help truly appreciated.
Gurvinder
<br><hr align="left" width="300">
View this message in context: <a href="http://n3.nabble.com/Can-we-use-from-CE-in-Decision-Tables-tp67005p67005.html">Can we use 'from' CE in Decision Tables ?</a><br>
Sent from the <a href="http://n3.nabble.com/Drools-User-f47000.html">Drools - User mailing list archive</a> at Nabble.com.<br>