I'm writing a constraint in OCL that verify that all elements in libraries have reliability assigned from catalog.
sysml:SysMLBlock
inv:
not(self.rawFailureRate > 0 and self.failureRateMode.toString() <> 'FROM_CATALOG')
I want this check to ignore the elements that are in a library called "Hypotheses Library". If this was javascript I would be looping on ".the_owner" calls until it is empty, extract the library name and do something like this :
inv:
not(self.rawFailureRate > 0 and self.failureRateMode.toString() <> 'FROM_CATALOG' and libName <> 'Hypotheses Library')
Is there a shortcut that can be called from a element to get it's highest owner in the structure or a clean way to do this in OCL ?
Have a nice day,
Adrien Gerard