<p><br>
Am 22.10.2011 20:28 schrieb &quot;Martin A&quot; &lt;<a href="mailto:wmlsub@gmail.com">wmlsub@gmail.com</a>&gt;:<br>
&gt;<br>
&gt; Hello,<br>
&gt;<br>
&gt; I try to put a condition in my LHS, such as:<br>
&gt;<br>
&gt; rule &quot;initial_playground_dialog&quot;<br>
&gt;     #agenda-group &quot;firstTimeUser&quot;<br>
&gt;     #salience 99<br>
&gt;     when<br>
&gt;         $gst : GameStateController(!hasEventOccurred(&quot;initial_playground_dialog&quot;))<br>
&gt;         $list : List()<br>
&gt;         $screen : FrontendScreen.PLAYGROUND<br>
&gt;     then<br>
&gt;        ....<br>
&gt; end<br>
&gt;<br>
&gt; where &#39;FrontendScreen&#39; is an enum and PLAYGROUND is its property. </p>
<p>Is it actually a property of an enum or rather one of the enum literals?</p>
<p>If it is actually a property, you will need to obtain an instance of the FrontendScreen enum first. If PLAYGROUND is actually an enum literal and you want to bind this literal to a variable, use:</p>
<p>$screen: FrontendScreen( this == FrontendScreen.PLAYGROUND )</p>
<p>Regards </p>
<p>Ansgar <br></p>
<p>&gt; However I get a syntax error. What&#39;s the proper way to check for and assign such a session object?<br>
&gt;<br>
&gt; Any help is appreciated!<br>
&gt;<br>
&gt; Best regards,<br>
&gt; Martin<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; rules-users mailing list<br>
&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;<br>
</p>