[rules-users] Binding a variable with an OR pattern

Joe Ammann joe at pyx.ch
Tue Aug 13 09:35:13 EDT 2013


On 08/13/2013 03:18 PM, Wolfgang Laun wrote:
> rule "R7012: UpdateInstrumentsIssuerFrom700[01]"
> agenda-group "TRANSFER_TO_LIVE"
> salience 100
> when
>     sirole : SourcingInstitutionRole(sourcing_Status ==
> SourcingStatus.IMPORTED,
>                                      roleCd == "7000"  || == "7001")
>
> and minor changes in the then part.
Hm, that was my first thought too - but doesn't such a rule fire 2 times
if there are 2 facts (one with 7000 and another one with 7001)?

Because this would be wrong: if both facts exist, the rule should only
trigger once, with the 7001 fact. The 7000 fact would need to be ignored
in that case.

Probably I wasn't clear when I stated my problem :-) Sorry

Thanks!

-- 
CU, Joe



More information about the rules-users mailing list