Mark Proctor wrote
If you look at the implementation for the interface, you'll see
it can be
cast. "org.drools.rule.Rule" is considered internal, so you can cast - but
beware, it may change later.
Mark
Thanks for the tip Mark.
Instead of
((org.drools.impl.KnowledgeBaseImpl)drools.getKnowledgeRuntime().getKnowledgeBase()).getRuleBase().getPackage("pk_name").getRule("rule_name")
I can do
((org.drools.rule.Rule)drools.getKnowledgeRuntime().getKnowledgeBase().getRule("pk_name",
"rule_name"))
Happy!
--
View this message in context:
http://drools.46999.n3.nabble.com/Simpler-API-to-access-the-Rule-object-i...
Sent from the Drools: User forum mailing list archive at
Nabble.com.