<br> The "arrow" is an old syntax from the Drools 3.0 times that is no longer necessary and was deprecated in 4. It is the exact same thing as a bind+eval:<br><br>MemberBlog(member : member -> (member.getUsername().equals( principal.getName()))) <br>
<br> Above is exact same thing as:<br><br>MemberBlog(member : member, eval(member.getUsername().equals( principal.getName()))) <br><br> But in Drools 4 and 5, that can be simplified to:<br><br>MemberBlog( member.username == <a href="http://principal.name">principal.name</a> ) <br>
<br> Much cleaner as you can see.<br><br> []s<br> Edson<br>
<br>
<br><br><div class="gmail_quote">2009/5/1 lightbulb432 <span dir="ltr"><<a href="mailto:veerukrishnan@hotmail.com">veerukrishnan@hotmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
What does the arrow ("->") mean in a rule file? I've searched on Google,<br>
looked through the Drools documentation, and haven't been able to find out<br>
what it does.<br>
<br>
It appears in the autocomplete of my IDE for Drools, and I've seen it in an<br>
example in the JBoss Seam documentation, but am unable to tell what it does:<br>
<br>
rule InsertMemberBlog<br>
no-loop<br>
activation-group "permissions"<br>
when<br>
principal: Principal()<br>
memberBlog: MemberBlog(member : member -><br>
(member.getUsername().equals(principal.getName())))<br>
check: PermissionCheck(target == memberBlog, action == "insert", granted<br>
== false)<br>
then<br>
check.grant();<br>
end;<br>
<font color="#888888"><br>
<br>
--<br>
View this message in context: <a href="http://www.nabble.com/What-does-the-arrow-%28%22-%3E%22%29-mean-in-a-rule-file--tp23341009p23341009.html" target="_blank">http://www.nabble.com/What-does-the-arrow-%28%22-%3E%22%29-mean-in-a-rule-file--tp23341009p23341009.html</a><br>
Sent from the drools - user mailing list archive at Nabble.com.<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" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>