Thanks Mark.<div><br></div><div>Can you tell me which API will get me the reference to when condition.</div><div>I want to know the name of Objects say Object1,Object2.......</div><div><br></div><div>-Kinjal</div><div><br>
<div class="gmail_quote">2010/5/28 Mark Proctor <span dir="ltr">&lt;<a href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">



  

<div bgcolor="#ffffff" text="#000000"><div><div></div><div class="h5">
On 29/05/2010 01:13, Kinjal Khandhar wrote:
<blockquote type="cite">Hello All,
  <div><br>
  </div>
  <div>I am working on Drools Rules and need help on the below problem:</div>
  <div><br>
  </div>
  <div>In my .drl file say:</div>
  <div><b>rule</b></div>
  <div><b>when</b></div>
  <div><b>    Object1(......)</b></div>
  <div><b>    Object2(......)</b></div>
  <div><b>then</b></div>
  <div><b>   </b></div>
  <div><b>end;</b></div>
  <div><br>
  </div>
  <div><br>
  </div>
  <div>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.</div>
  <div><br>
  </div>
  <div>In a way I want to introspect the <b>when condition</b> objects.</div>
  <div><br>
  </div>
  <div>If anyone has any idea,please let me know.</div>
</blockquote></div></div>
You can, but you&#39;ll need to use the internal api. Just get a reference
to the rule LHS and iterate down the tree structure, you&#39;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.<br>
<br>
Mark<br>
<blockquote type="cite">
  <div><br>
  </div>
  <div>Thanks,</div>
  <div>Kinjal</div><div class="im">
  <div><br>
  </div>
  <pre><fieldset></fieldset>
_______________________________________________
rules-users mailing list
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a>
  </pre>
</div></blockquote>
<br>
</div>

<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br></div>