<p><br>
Am 22.10.2011 20:28 schrieb "Martin A" <<a href="mailto:wmlsub@gmail.com">wmlsub@gmail.com</a>>:<br>
><br>
> Hello,<br>
><br>
> I try to put a condition in my LHS, such as:<br>
><br>
> rule "initial_playground_dialog"<br>
> #agenda-group "firstTimeUser"<br>
> #salience 99<br>
> when<br>
> $gst : GameStateController(!hasEventOccurred("initial_playground_dialog"))<br>
> $list : List()<br>
> $screen : FrontendScreen.PLAYGROUND<br>
> then<br>
> ....<br>
> end<br>
><br>
> where 'FrontendScreen' 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>> However I get a syntax error. What's the proper way to check for and assign such a session object?<br>
><br>
> Any help is appreciated!<br>
><br>
> Best regards,<br>
> Martin<br>
><br>
> _______________________________________________<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">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
><br>
</p>