[rules-users] Checking Attributes of objects contained within other ones

Mark Proctor mproctor at codehaus.org
Thu May 17 16:32:49 EDT 2007


As long as you are in 4.0MR2 you can use 'from' to achieve this without 
using eval.
$cma : CmAdjustment( status != "Full Match", adjCmNumber : cmNumber, 
adjCmQuantity : availableQuantity)
Payment(tolPercent == Constants.ACCEPT_ALL) from $cma.originalRepaymentCode

Mark
Ronald R. DiFrango wrote:
> All,
>
> I want to do the following:
>
> CmAdjustment( status != "Full Match", adjCmNumber : cmNumber, 
> adjCmQuantity : availableQuantity, originalRepaymentCode.tolPercent == 
> Constants.ACCEPT_ALL)
>
> But it seems like I can not inspect the attributes of class that is 
> contained within the top level one that is passed into working memory.
>
> Is utilizing eval my only option or are there others?  I was thinking 
> something like the following:
>
> CmAdjustment( status != "Full Match", adjCmNumber : cmNumber, 
> adjCmQuantity : availableQuantity, repayCode: originalRepaymentCode)
> eval(repayCode.tolPercent == Constants.ACCEPT_ALL)
>
> The problem I see with this is performance as I have large data sets 
> and a fairly large rule set.
>
> Thanks,
>
> Ron
> ------------------------------------------------------------------------
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070517/d876ad56/attachment.html 


More information about the rules-users mailing list