[rules-users] Binding a variable with an OR pattern
Wolfgang Laun
wolfgang.laun at gmail.com
Tue Aug 13 10:31:34 EDT 2013
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 )
-W
On 13/08/2013, Joe Ammann <joe at pyx.ch> wrote:
> 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
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
More information about the rules-users
mailing list