Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Operations Dialog - General

Access    Select element in diagram or Project Browser and:

                 Element context menu | Operations
                (F10)   or
               Element | Operations

 

The Operations dialog has seven pages:

General
Parameters
Behavior
Advanced
Tagged Values
Pre-conditions and Post conditions (that is, Constraints)

 

The General page of the Operations dialog enables you to define new operations and set the most common properties, including name, access type and return.

Field/Button

Usage

See also

Name

Display the selected operation name.

 

 

Parameters

Display the parameter list.

See the Parameters Dialog topic for information regarding what this string can contain.

 

Parameters Dialog

Edit Parameters

Open the Parameters dialog.

 

Return Type

(This option is not shown for State or State Machine elements.)

Display the data type returned by the operation.

The type can be defined by the code language (data type) or by a classifier element; when you click on the drop-down arrow, the set of values in the list provides the appropriate data types.

To select or define possible classifiers, either click on the Select Type option in the list, or click on the (  ...  )  (Select) button to display the Select <Item> dialog.

To add new code language data types that can be displayed in this list, see the Data Types topic.

 

Instance classifier

Data Types

(  ...  ) (Return Type Browse button)

Open the Select <Item> dialog to select the operation return type.

(Not shown for State or State Machine elements.)

 

Instance classifier

Action

Define the action of the operation: do, exit or entry.

(For State or State Machine elements.)

 

State

State Machine

Scope

Select one of:

Public
Protected
Private
Package

 

 

Stereotype

Specify an optional stereotype for this operation.

 

 

Concurrency

Set the concurrency of the operation.

 

 

Alias

Define an optional alias for the operation.

 

 

Notes

Enter free text notes.

You can format this text if necessary, using the Notes toolbar at the top of  the field.

 

Notes toolbar

Virtual/Abstract

If the operation's language is set to C++, map to the C++ Virtual keyword.

Otherwise this option is Abstract, pertaining to an abstract function.

(This option is not shown for State or State Machine elements.)

 

 

Return Array

Indicate that the return value is an array.

(This option is not shown for State or State Machine elements.)

 

 

Synchronized

Specify a code engineering flag that relates to multi threading in Java.

(This option is not shown for State or State Machine elements.)

 

 

Static

Indicate that the operation is a static member.

(This option is not shown for State or State Machine elements.)

 

 

Const

Indicate that the return type of this method is constant.

(This option is not shown for State or State Machine elements.)

 

 

Pure

Indicate that C++ is pure virtual syntax

virtual void myFunction( ) = 0;

(This option is not shown for State or State Machine elements.)

 

 

IsQuery

Indicate that this method does not modify the object.

(This option is not shown for State or State Machine elements.)

 

 

Up/Down Buttons

Change the order of operations in the list.

 

 

New

Create a new operation.

 

 

Copy

Copy the currently selected operation.

 

 

Save

Save a new operation, or save modified details for existing operation.

 

 

Delete

Delete the currently selected operation.

 

 

Name/Parameters/Return Type

List the existing Operations for the selected element.

 

 

Notes

The General page can vary according to the type of element you are adding an operation to; if defining operations for a data modeling table, see the Indexes, Triggers and Check Constraints topics
If you make changes and do not save them, the Cancel button prompts you to confirm or cancel the changes, whilst the Close button closes the dialog immediately and does not save the changes
If you are creating many operations, go to the Attribute/Operations page of the Options dialog (Tools | Options | Source Code Engineering | Attribute/Operations) and select the After save, re-select edited item checkbox; now, when you create an operation and click on the Save button, the dialog fields clear ready for you to enter the details of the next operation - this helps you when you want to create operations quickly and might not necessarily want to fully define each one as you create it

Learn more