<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 29/05/2010 01:13, Kinjal Khandhar wrote:
<blockquote
cite="mid:AANLkTikw0FXVN-mamn3b84o0yLrOD9gb7mRzpdR5M7Ls@mail.gmail.com"
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>
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.<br>
<br>
Mark<br>
<blockquote
cite="mid:AANLkTikw0FXVN-mamn3b84o0yLrOD9gb7mRzpdR5M7Ls@mail.gmail.com"
type="cite">
<div><br>
</div>
<div>Thanks,</div>
<div>Kinjal</div>
<div><br>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
</blockquote>
<br>
</body>
</html>