[rules-users] How to find rules, that use special fields in their Condition

mdzaebel mdzaebel at web.de
Fri May 3 16:42:54 EDT 2013


Hi,

the following code traverses rules and their conditions. However, I did not
find a method to find conditions, that match over a certain field of a
declared class. I know, that the rule API should be hidden for good reasons
(Mark Proctor).

for(Rule ruleDef : kb.getKnowledgePackages().iterator().next().getRules()) {
    for(RuleConditionElement rce :
((RuleImpl)ruleDef).getRule().getLhs().getChildren()) {
        for(Map.Entry<String, Declaration> entry :
rce.getInnerDeclarations().entrySet()) {
            ??

Thanks, Marc







--
View this message in context: http://drools.46999.n3.nabble.com/How-to-find-rules-that-use-special-fields-in-their-Condition-tp4023673.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list