Re: [rules-users] Finding the definition of a rule
Thank you very much, it worked. kind regards Lukas -- View this message in context: http://drools.46999.n3.nabble.com/Finding-the-definition-of-a-rule-tp4020183p4020196.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Finding the definition of a rule
org.drools.rule.Rule has a getResource() method, set during the build process, that is not publicly reflected by the org.drools.definition.rule.Rule interface. Iterating over knowledgeAgent.getKnowledgeBase().getKnowledgePackage("xyz").getRules() with a type check and a cast should do the trick. Maybe Mark can tell if it would be appropriate to expose it or not. Best Davide -- View this message in context: http://drools.46999.n3.nabble.com/Finding-the-definition-of-a-rule-tp4020183p4020186.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Finding the definition of a rule
Hi, I am currently using a KnowledgeAgent to implement hot deployment in our applications. So far this is working, but now the requirement arose to remove specific rules via program call. I thought the easiest way would be to remove the rule from the resources and let the KnowledgeAgent handle the rest. But as far as I see, there is no way to get the source resource of a rule from the KnowledgeBase/RuleBase. I guess I wont have another choice than to parse the initial changeset, gather all resources, and go through them to find and remove the rule. But this seems like overkill to achieve something that simple. Does anybody know a better way to remove specific rules while using a KnowledgeAgent. kind regards Lukas -- View this message in context: http://drools.46999.n3.nabble.com/Finding-the-definition-of-a-rule-tp4020183.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users