I am using Cameo Systems Modeler 19.0 SP3.
I am trying to use OCL to validate that a tag value of a block is not set to a particular enumeration literal, but I keep getting and Unknown type error:
The example model has a profile that defines a stereotype named “Core”.
The Core stereotype redefines an inherited property named “eD” having multiplicity 1 and a type “EXDE”.
Core has a <<validationRule>> constraint named “Core Constraint” applied which specifies:
- Code: Select all
Context Core inv Core Constraint
self.eD <> EXDE::I
EXDE is a SysML enumeration ( <<valueType>>) with enumeration literals “I” and “E”.
The model has a BDD with a block named “My Core” having the <<Core>> stereotype applied.
When I validate the BDD I get the error:
Expression has errors:Semantic error at [0:11]: Unknown type ([EXDE,I])
I’m not sure why my enumeration is not understood as a valid Type in OCL, but works fine as a Type in the model.
What would be the OCL to ensure that a Core instance does not have its eD tag set to a value of “I”?
Thanks!
Here are some images from the example: