[rules-users] Rule definition introspection

Mark Proctor mproctor at codehaus.org
Fri Feb 17 00:05:15 EST 2012


On 17/02/2012 01:11, GPatel at tsys.com wrote:
> Is it possible to self-introspect the rule definition?
>
> For example:
>
> when
>         $redCar : Car(color == 'red')
> then
>         System.out.println("a red car exists");
>
> Is it possible to know that the above rule uses the Car fact and the 
> Car.color attribute?
Yes, but you'll need to dig into internal apis. If you are doing this at 
runtime just start introspecting the rule object to get an idea of all 
the internal data structures.

Mark
>
> Thanks
> G. Patel ----------------------------------------- The information 
> contained in this communication (including any attachments hereto) is 
> confidential and is intended solely for the personal and confidential 
> use of the individual or entity to whom it is addressed. If the reader 
> of this message is not the intended recipient or an agent responsible 
> for delivering it to the intended recipient, you are hereby notified 
> that you have received this communication in error and that any 
> review, dissemination, copying, or unauthorized use of this 
> information, or the taking of any action in reliance on the contents 
> of this information is strictly prohibited. If you have received this 
> communication in error, please notify us immediately by e-mail, and 
> delete the original message. Thank you
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120217/52840fe2/attachment.html 


More information about the rules-users mailing list