Object Constraint Language (OCL) sample

This sample illustrates the use of Object Constraint Language (OCL) in Unified Modeling Language (UML) models. The sample shows how the version of OCL implemented in IBM® Rational® products differs from the OCL specification.
Time required: 1 minute
Note: This sample might require some optionally installable components. If you encounter errors or cannot find user interface options when you run the sample, ensure that you installed the appropriate optional components.
To successfully work with this sample, you must have the following component installed:
  • Extensibility features
Note: For this sample, the profile and the model are located in the same project to simplify the importing procedure; however, this practice is not generally recommended for projects that are shared in a team environment

The sample shows OCL constraints with explanatory comments, as in this excerpt.

Click to enlarge image


Feedback