[rules-users] Simpler API to access the Rule object in RHS?
Sonata
plz.write.to at gmail.com
Tue Jul 16 21:19:15 EDT 2013
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-in-RHS-tp4024921p4024951.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
More information about the rules-users
mailing list