There are two ways to run an OCL query in the OCLEditor. The first one allows navigation from the
model element to the associated query which is shown in this
flash tutorial.
The second one allows navigation from the OCL query to the model element
and is stated in this section.
Open the file
querylib.oclx in the OCL editor if you do not already
have it open.
numberOfAttributes query in the Outline view.
The first line in the Console View shows the result of evaluation on Class::C1, the rest of evaluation on Class::C2.
As expected, the message part of the query is printed to the console: Evaluating the query on Class::C1 results in false, because the trigger evaluates to false. The trigger of evaluating on Class::C2 results in true, so the message is printed out.