thank you for response
 
i typed eval(wrapper.getValue("KEY")) in the header of the excel column
 
but i get
 

org.drools.rule.InvalidRulePackage: [7,63]: unknown:7:63 mismatched token: [@33,182:183='==',<76>,7:63]; expecting type RIGHT_PAREN[16,63]: unknown:16:63 mismatched token: [@71,353:354='==',<76>,16:63]; expecting type RIGHT_PAREN[25,63]: unknown:25:63 mismatched token: [@109,524:525='==',<76>,25:63]; expecting type RIGHT_PAREN[34,63]: unknown:34:63 mismatched token: [@147,695:696='==',<76>,34:63]; expecting type RIGHT_PAREN[43,63]: unknown:43:63 mismatched token: [@185,866:867='==',<76>,43:63]; expecting type RIGHT_PAREN[52,63]: unknown:52:63 mismatched token: [@223,1035:1036='==',<76>,52:63]; expecting type RIGHT_PAREN[61,63]: unknown:61:63 mismatched token: [@261,1204:1205='==',<76>,61:63]; expecting type RIGHT_PAREN

at org.drools.rule.Package.checkValidity(Package.java:424)

at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:394)

at com.sample.DroolsExcelTest.readRule(DroolsExcelTest.java:66)

at com.sample.DroolsExcelTest.main(DroolsExcelTest.java:22)

----- Original Message -----
From: Knapp, Barry
To: Rules Users List
Sent: Wednesday, December 03, 2008 2:14 PM
Subject: RE: [rules-users] accessing hashmap from condition on decision table

You may want to wrap your map in another class that you assert into the engines working memory.

 

Then you can access the contents of the map with an eval

 

eval(myMapWrapper.get(“KEY”).equals(“SOME_VALUE”))

 

 

Barry

 

 

From: rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Sascha
Sent: Wednesday, December 03, 2008 7:32 AM
To: Rules Users List
Subject: [rules-users] accessing hashmap from condition on decision table

 

i got a java class with a hashmap containing string keys and values.

 

i want to access the values from a condition on a decision table.

 

e.g. map.get("mykey")

 

how can i do this?

 

i tried but got an

unknown:7:50 Unexpected token

error.

greetings sascha


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users