[rules-users] Introspect Rules When condition

Kinjal Khandhar kinjal.khandhar at gmail.com
Sat May 29 14:42:53 EDT 2010


Thanks Mark.

Can you tell me which API will get me the reference to when condition.
I want to know the name of Objects say Object1,Object2.......

-Kinjal

2010/5/28 Mark Proctor <mproctor at codehaus.org>

>  On 29/05/2010 01:13, Kinjal Khandhar wrote:
>
> Hello All,
>
>  I am working on Drools Rules and need help on the below problem:
>
>  In my .drl file say:
> *rule*
> *when*
> *    Object1(......)*
> *    Object2(......)*
> *then*
> *   *
> *end;*
>
>
>  Is there a way(Drools API or any method) in which I can scan through my
> rules files and get the objects...say Object1 and Object2.
>
>  In a way I want to introspect the *when condition* objects.
>
>  If anyone has any idea,please let me know.
>
> You can, but you'll need to use the internal api. Just get a reference to
> the rule LHS and iterate down the tree structure, you'll need to get a
> reference the internal Rule object, just mess around int the eclipse
> variable viewer and you should start to get a hang of things.
>
> Mark
>
>
>  Thanks,
> Kinjal
>
>
> _______________________________________________
> rules-users mailing listrules-users at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
> _______________________________________________
> 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/20100529/a8e7208f/attachment.html 


More information about the rules-users mailing list