Prev Next

Operation Constraints

Constraints define the contractual behavior of an operation, what must be true before they are called (pre-conditions) and what is true after they are called (post-conditions). In this respect they are related to the State model of a Class and can also relate to the guard conditions that apply to a transition. You can define both pre- and post- conditions for an operation.

Access

Before displaying the Properties window, click on the required operation in a diagram or the Project Browser.

Ribbon

Start > Explore > Properties > Properties > Pre    or     Post

Design > Element > Properties > Properties > Pre    or    Post

Keyboard Shortcuts

Alt+1 > Pre   or    Post

Define Constraints

The fields and options on the 'Pre' and 'Post' tabs of the Properties window are identical. Click on the appropriate tab to define the conditions prior to and following on from the operation behavior.

Option

Action

See also

Pre-Condition:
Post-Condition:

Type in the name or effect of the condition.

Type

Click on the drop-down arrow and click on the appropriate condition type.

<notes>

Type in any further explanation or description that is necessary for the condition.

New

Click on this button to clear the fields to define another condition.

Save

Click on this button to save the new or updated condition and to add the changes to the 'Pre-Condition' or 'Post-Condition' list.

This button also clears the data fields so that you can create another condition.

Pre-Condition
Post-Condition

Lists the pre-conditions or post-conditions that have been defined for this operation.

Click on an item in this list to re-populate the dialog fields with the details, to edit or delete the condition.

Delete

Click on an item in the 'Pre-Condition' or 'Post-Condition' list and click on this button to delete that condition from the operation.