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:

MemberBlog(member : member -> (member.getUsername().equals( principal.getName())))

   Above is exact same thing as:

MemberBlog(member : member, eval(member.getUsername().equals( principal.getName())))

   But in Drools 4 and 5, that can be simplified to:

MemberBlog( member.username == principal.name )

   Much cleaner as you can see.

   []s
   Edson



2009/5/1 lightbulb432 <veerukrishnan@hotmail.com>

What does the arrow ("->") mean in a rule file? I've searched on Google,
looked through the Drools documentation, and haven't been able to find out
what it does.

It appears in the autocomplete of my IDE for Drools, and I've seen it in an
example in the JBoss Seam documentation, but am unable to tell what it does:

rule InsertMemberBlog
 no-loop
 activation-group "permissions"
when
 principal: Principal()
 memberBlog: MemberBlog(member : member ->
(member.getUsername().equals(principal.getName())))
 check: PermissionCheck(target == memberBlog, action == "insert", granted
== false)
then
 check.grant();
end;


--
View this message in context: http://www.nabble.com/What-does-the-arrow-%28%22-%3E%22%29-mean-in-a-rule-file--tp23341009p23341009.html
Sent from the drools - user mailing list archive at Nabble.com.

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



--
 Edson Tirelli
 JBoss Drools Core Development
 JBoss, a division of Red Hat @ www.jboss.com