<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 17/02/2012 01:11, <a class="moz-txt-link-abbreviated" href="mailto:GPatel@tsys.com">GPatel@tsys.com</a> wrote:
<blockquote
cite="mid:OFC009D1F3.EA269363-ON072579A7.00060067-072579A7.00068508@tsys.com"
type="cite"><font face="sans-serif" size="2">Is it possible to
self-introspect the rule
definition?</font>
<br>
<br>
<font face="sans-serif" size="2">For example:</font>
<br>
<br>
<font face="sans-serif" size="2">when</font>
<br>
<font face="sans-serif" size="2"> $redCar
: Car(color == 'red')</font>
<br>
<font face="sans-serif" size="2">then</font>
<br>
<font face="sans-serif" size="2"> System.out.println("a
red car exists");</font>
<br>
<br>
<font face="sans-serif" size="2">Is it possible to know that the
above
rule uses the Car fact and the Car.color attribute?</font>
<br>
</blockquote>
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.<br>
<br>
Mark<br>
<blockquote
cite="mid:OFC009D1F3.EA269363-ON072579A7.00060067-072579A7.00068508@tsys.com"
type="cite">
<br>
<font face="sans-serif" size="2">Thanks</font>
<br>
<font face="sans-serif" size="2">G. Patel</font>
-----------------------------------------
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 <br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
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>