Hi,
I'm trying to figure out how to best apply an OCL constraint that checks to make sure the default value assigned to a constraint parameter input is within a valid lower and upper bound. I created a custom stereotype that is a generalization of a ConstraintParameter with two additional attributes called "Valid Lower Limit" and "Valid Upper Limit". The OCL expression "Valid_Upper_Limit > Valid_Upper_Limit" produces an expected Boolean response (true/false) based on the assigned values. However the OCL expression "defaultValue > Valid_Lower_Limit" does not evaluate.
I reviewed the comments from another post (see url below) and I believe the issue has to do with the UML primitive value types, but I'm not sure how to correct it. When I compare the custom attributes, which both are typed by a SysML "Real" type, the OCL expression evaluates. I tried to apply the solution in the post below to my own situation but was unsuccessful. I would like to understand the syntax of that solution and if/how I can apply it for my situation. I have provided a sample model.
ocl-comparing-integers-t3063-10.html