[rules-users] bug or feature not yet implemented

Edson Tirelli tirelli at post.com
Fri Aug 10 11:58:10 EDT 2007


   Sergey,

   That is how it is supposed to work. A field constraint in Drools always
has a field at its left side. If you want arbitrary expression, just embed
it in an inline eval:

        S : Supplier(
                $sts  : supplierBusinessStatus.businessStatus,
                $csts :
corporateSupplier.supplierBusinessStatus.businessStatus,
                eval ( $sts != $csts )
        )

   Although, for this specific case, it would be better (more performatic)
to simply write:

        S : Supplier(
                $sts  : supplierBusinessStatus.businessStatus,
                $csts :
corporateSupplier.supplierBusinessStatus.businessStatus != $sts
        )

    []s
    Edson

2007/8/10, Manukyan, Sergey <SManukyan at lear.com>:
>
>
> Folks,
>
> I found that drools 4.0GA doesn't recognize variables in the left side
> of operator expression
>
> Like this produces error:
>
>
> When
>         S : Supplier(
>                 $sts  : supplierBusinessStatus.businessStatus,
>                 $csts :
> corporateSupplier.supplierBusinessStatus.businessStatus,
>                 $sts != $csts
>                 )
> Then
>         ...
>
>
>
> It tries to treat the $sts variable as a field of Supplier, instead
> understanding that it is a variable declared earlier,
>
> Please advise,
>
> Thanks,
>
> -Sergey
>
>
>
>
> **********************
> ** LEGAL DISCLAIMER **
> **********************
>
> This E-mail message and any attachments may contain
> legally privileged, confidential or proprietary
> information. If you are not the intended recipient(s),
> or the employee or agent responsible for delivery of
> this message to the intended recipient(s), you are
> hereby notified that any dissemination, distribution
> or copying of this E-mail message is strictly
> prohibited. If you have received this message in
> error, please immediately notify the sender and
> delete this E-mail message from your computer.
>
> _______________________________________________
> 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/20070810/02d2f2e0/attachment.html 


More information about the rules-users mailing list