finos/rune-dsl

Condition with only exists operator should only validate attributes on the type that contains the condition

hugohills-regnosys opened this issue · 0 comments

If validating an instance of type B, then when the only exists expression in the condition on super type A is executed, it should only apply to the attributes of type A.

type A:
    a1 string (0..1)
    a2 string (0..1)
    a3 boolean (0..1)

    condition:
        a1 only exists 
        or a3 = True

type B extends A:
    b1 string (0..1)

Currently, given an instance of type B with both a1 and b1 populated, the condition will fail because the only exists evaluates to false.