Hi, I have created a very simple DSL file as below. It just reads the data from hashmap and sets the decision based on the key value present in the hashmap passed to Guvnor.
[consequence][]Decision for DynamicValue is set as Denied=dec.setDecision("Denied"); [condition][]Decision Object=dec:Decisions() [condition][]Map Object=mp:DynMap() [condition][]Evaluate Dynamic value of rules=eval(mp.getMap().get("AssetID").toString().trim()=="8-AIT-3243") I now want to create a rule such that I am able to enter both LHS and RHS dynamically and the rule will fetch the data based on the key value.. something like below When dynamicAttribute("Assetid")="23" then System.out.println(Sucess); else dynamicAttribute("repoid")="23" then System.out.println(Sucess); end My DSL works fine now just tht I want to make it more user frindly and want the dynamic attribute to be listed in the dropdown for users to select it .. Thanks, BB -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/How-to-write-a-simple-DSL-which-can-be-used-in-setting-comparing-the-value-prsent-in-hashmap-tp1016726p1016726.html Sent from the Drools - User mailing list archive at Nabble.com. _______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users