[rules-users] Usage of 'exists' keyword to get the number of occurance?
Edson Tirelli
tirelli at post.com
Fri Jun 1 14:53:29 EDT 2007
Nope, if you want actual instances you must use "collect":
when
context : Context(state == Context:START_UP)
list : ArrayList( size > 0 ) from collect( ClassName(varName =="value" ) )
then
// list has your matching ClassName objects
end
[]s
Edson
2007/6/1, Rajesh.Sachin10 <rajesh_sachin10 at yahoo.co.in>:
>
>
> Its possible to use 'exists' keyword to get the number of occurance?
>
> Eg:
>
> context : Context(state == Context:START_UP) exists ClassName(varName ==
> "value")
>
>
> The ClassName is an Object array..... So to get the number of occurance of
> the "value" in varName, we have any method or keywords?
> --
> View this message in context:
> http://www.nabble.com/Usage-of-%27exists%27-keyword-to-get-the-number-of-occurance--tf3853750.html#a10917875
> Sent from the drools - user mailing list archive at Nabble.com.
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
--
Edson Tirelli
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070601/1be713b3/attachment.html
More information about the rules-users
mailing list