On 13/08/2013, Joe Ammann <joe(a)pyx.ch> wrote:
On 08/13/2013 04:31 PM, Wolfgang Laun wrote:
> Sorry, I missed that.
>
> rule "R7012: UpdateInstrumentsIssuerFrom700[01]"
> agenda-group "TRANSFER_TO_LIVE"
> salience 100
> when
> sirole : SourcingInstitutionRole(sourcing_Status ==
> SourcingStatus.IMPORTED,
> $rcd: roleCd == "7000" || ==
> "7001")
> not SourcingInstitutionRole(sourcing_Status ==
> SourcingStatus.IMPORTED,
> roleCd == "7001" && > $rcd
)
>
Works nicely! Just to make sure that I correctly understood it:
The "roleCd == "7001" && > $rcd" part of the last pattern
could also be
written as "roleCd == "7001" && != $rcd". That &&
> is just to make sure
the last pattern matches for the 7000 fact if there is a corresponding
7001 fact.
!= and > having the same result, as we're down to two. A
generalization to N > 2 wouldn't be so easy, though.
-W
Thanks again!
--
CU, Joe
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users