New Features of UML2 |  Long Talk | Copyright © IBM Corp., 2007-2008.  All rights reserved.
41
OCL Integration: What is it?
•OCL is designed to be a simple language for specification of constraints and queries in models.
•
•Specifying Constraints
•
wInvariant constraint – condition on attributes (or any feature of context classifier) must always be true.
•
wQuery – specified as the body expression of an operation.
•
•Have code generated from the expressions entered in the UML model.
OCL is often used to specify operation precondition and postcondition constraints. A third kind of OCL expression defined on operations is the body expression, which defines the value of the operation in terms of its parameters and the properties of the context classifier.