Chapter 16. Advanced Features

Table of Contents
Constraints with OCL
Searching for Model Elements

Constraints with OCL

UML is basically a graphical language. As a graphical language it is very suitable for expressing high-level abstractions for architectures, workflows, processes etc. But for expressing very detailed and fine-grained things like algorithms, equations or constraints, textual languages just tend to be more convenient.

The current UML recognizes this and comes with a supplementary textual language to express constraints. This language is called the Object Constraint Language, or abbreviated OCL. Although Poseidon does not require OCL, nor does it check OCL syntax, there are certainly no restrictions prohibiting you from using OCL.

Since OCL is noted as text, it is simple to support, and many UML tools do it just that way. You can simply enter lines of text in certain fields reserved for constraints. In Poseidon for UML you can do that in the Constraints tab on the Details pane, as shown in the figure below.

Figure 16-1. A Constraints tab.