[rules-users] Is rule introspection available from the Drools API?
milen igrachev
igrachev at abv.bg
Mon Jan 6 04:51:28 EST 2014
Hello, is there a way to introspect a Drools file from within java code? What I need is to be able to identify the facts and the fact attributes that are used in a given DRL file.
For example if I have a rule stored in a customer.drl DRL file within my project, containing the following definition:
package myRulePackage
import org.rules.model.Customer import org.rules.model.Mambership
rule "is eligible customer" when $c:Customer(status == "active") Membership(customer == $c, type == "premium") then $c.setEligibilityStatus(true); end
What i need is a way to understand that this ruleset customer.drl is using two fact types - Customer and Membership and three of their attributes - Customer.status, Membership.customer and Membership.type.
I found some information on the internet that such functionality is not supported, however the information was a bit too old, so I decided to ask again.
Big thanks for the support!
Milen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140106/06cf3905/attachment-0001.html
More information about the rules-users
mailing list