<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV>This works:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>if your fact is:</DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">cl = Class.forName(</SPAN></FONT><FONT class="Apple-style-span" color="#2A00FF" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">"java.lang.String"</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">);</SPAN></FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>And the rule is:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#960000" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">rule</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;"> </SPAN></FONT><FONT class="Apple-style-span" color="#008000" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">"Test Class type"</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN><FONT class="Apple-style-span" color="#960000" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">when</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">$cl: Class(this == (String.class))</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN><FONT class="Apple-style-span" color="#960000" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">then</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">System.out.println(</SPAN></FONT><FONT class="Apple-style-span" color="#008000" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">"Test Class: OK"</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">);</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#960000" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">end</SPAN></FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR><DIV><DIV>On 26-07-2007, at 12:11, Eric Miles wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"> Eh, I need a marker fact that identifies if a certain rule needs to be run.  So I'm inserting a java.lang.Class&lt;T&gt; object into the session.  The T determines if a rule is activated.  Does that make sense?<BR> <BR> On Thu, 2007-07-26 at 16:06 +0100, Anstis, Michael (M.) wrote: <BLOCKQUOTE type="CITE"> <PRE><FONT color="#000000">Surely this LHS is matched by the pattern</FONT>

<FONT color="#000000">$sc : SomeClass()</FONT>

<FONT color="#000000">??? </FONT>

<FONT color="#000000">-----Original Message-----</FONT>
<FONT color="#000000">From: <A href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</A></FONT>
<FONT color="#000000">[<A href="mailto:rules-users-bounces@lists.jboss.org">mailto:rules-users-bounces@lists.jboss.org</A>] On Behalf Of Eric Miles</FONT>
<FONT color="#000000">Sent: 26 July 2007 15:19</FONT>
<FONT color="#000000">To: <A href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</A></FONT>
<FONT color="#000000">Subject: [rules-users] Quick syntax question</FONT>

<FONT color="#000000">Is there an easier way to write this LHS?</FONT>

<FONT color="#000000">Class(name == 'com.mycompany.SomeClass')</FONT>

<FONT color="#000000">It would be nice to do something like this:</FONT>

<FONT color="#000000">Class(name == SomeClass.class.getName())</FONT>

<FONT color="#000000">Suggestions?</FONT>

<FONT color="#000000">Thanks all!</FONT>

<FONT color="#000000">_______________________________________________</FONT>
<FONT color="#000000">rules-users mailing list</FONT>
<FONT color="#000000"><A href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</A></FONT>
<FONT color="#000000"><A href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</A></FONT>

<FONT color="#000000">_______________________________________________</FONT>
<FONT color="#000000">rules-users mailing list</FONT>
<FONT color="#000000"><A href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</A></FONT>
<FONT color="#000000"><A href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</A></FONT>
</PRE></BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">rules-users mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</A></DIV> </BLOCKQUOTE></DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV><SPAN class="Apple-style-span" style="text-decoration: underline;; -khtml-text-decorations-in-effect: underline; "><SPAN class="Apple-style-span" style="-khtml-text-decorations-in-effect: underline; ">                                                                        </SPAN></SPAN><DIV><FONT class="Apple-style-span" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;"><B style="font-size: 13px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-size: 13px; font-weight: bold; ">Felipe Piccolini M.</SPAN></B></SPAN></FONT></DIV><DIV><A href="mailto:felipe.piccolini@bluesoft.cl"><SPAN class="Apple-style-span" style="color: rgb(0, 0, 238); -khtml-text-decorations-in-effect: underline; ">felipe.piccolini@bluesoft.cl</SPAN></A></DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></DIV></BODY></HTML>