I have a business rule based on the equality of two collections.The condition A=B doesn't do the job, for = is in this case an assignment operator.So I tried to implement the condition with two conditions:A->forAll(B->exists(A.nr=B.nr)) and B->forAll(A->exists(B.nr=A.nr)), but nesting quantifiers doen't seem possible, the error message is 'mismatched brackets'.
Does anyone know how to solve this? Thanks.
My previous answer was incorrect, so I deleted it,
A->exists(A.nr=B.nr) and B->exists(A.nr=B.nr) does the trick together with the Corticon inference mechanism.
Are the 2 collections based on 2 different entities? So you have A.Nr and B.Nr as the attributes that need to be compared? Or do you have 1 entity with 2 aliasses A and B?
Hi Gertjan, yes
nr is the identifying attribute of the entities in both collections.
The entities in the collections are the same.
Does this do the trick for you?
A.Nr = B.Nr
A <> B
Hi Gertjan, my question was a little foolish. Due to the inference mechanisme of Corticon I didn't need the combination of quantifiers. I solved it with:
I guess your solution works as well, based on the same mechanisme.