The tabbed dialogue used for editing properties etc… includes a tab named “Constraints” which assists with the creation of constraints using the Object Constraint Language – Typically these contraints (whether OCL or natural language) would be displayed between curly braces after the element they restrict – alternatively a dashed line can be used to link them to an element via a note – I have created an OCL constraint but can’t seem to display it anywhere on the diagram.
e.g
+newAttr : int {context C inv: self.newAttr > 0}