<div dir="ltr">Thanks Wolfgang. I will look into Validator.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jul 29, 2013 at 2:01 PM, Wolfgang Laun <span dir="ltr">&lt;<a href="mailto:wolfgang.laun@gmail.com" target="_blank">wolfgang.laun@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">There is no *stable* API to obtain details about the LHS from the rule<br>
in a knowledge base. Validator does access LHS patterns and<br>
constraints for analysis, but this is rather tricky unless your rules<br>
are very simple.<br>
<br>
You can obtain the rule name from the activation. It&#39;s probably easier<br>
to associate rule names with rule texts, even though such a lookup<br>
isn&#39;t in the API.<br>
<br>
-W<br>
<div><div class="h5"><br>
On 29/07/2013, Sean Su &lt;<a href="mailto:sean.x.su@gmail.com">sean.x.su@gmail.com</a>&gt; wrote:<br>
&gt; Does anyone know a public Drools API that we can use to access to the<br>
&gt; actual rule logic in a structured way? Current we can use<br>
&gt; AgendaEventListener and WorkingMemoryEventListener to access the facts<br>
&gt; using in LHS and the objects used in RHS. But my project has some special<br>
&gt; requirements which need to access the actual rule logic on LHS for auditing<br>
&gt; and justification purpose.<br>
&gt;<br>
&gt; For example, if a rule is like this:<br>
&gt;<br>
&gt; when fact.list contains &quot;123&quot;<br>
&gt; then do something.<br>
&gt;<br>
&gt; When this rule is fired, not only do I need to know what the fact object<br>
&gt; is, I also need to know the condition of this rule is involved a &quot;contains&quot;<br>
&gt; API, with value &quot;123&quot;.<br>
&gt;<br>
&gt; Thanks in advance.<br>
&gt;<br>
&gt; Sean<br>
&gt;<br>
</div></div>_______________________________________________<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>
</blockquote></div><br></div>