Model Parts, Diagrams, Dictionary Items, and Properties > Dictionary items > Operation (dictionary item)
  
Operation (dictionary item)
For automation interface information about an Operation, see Operation (automation interface).
An operation is a function or transformation that can be applied to, or implemented by, the objects in a Class, Data Type or Interface. A Class, Data Type or Interface should have at least one Operation that performs a useful service to justify its existence. Operations:
Describe the observable behavior of an object
Apply to all members of the class
Are defined once at the class level
Are the visible interface to an internal method
Can include optional parameters and/or return values.
Each operation must have a clearly defined signature consisting of the number and type of input arguments and return values.
Create an Operation in the following ways:
Through the context menu of a Package or Model: right-click the item, point to New, point to UML, point to Behavior, and then click Operation.
Through the context menu of a Class, Data Type or Interface: right-click the item, point to New, and then click Operation.
Through the Operation button on the Class Diagram toolbar.
Through the Items tab of a Class', Model's or Package's Property Pages.
An Operation message:
Represents a signal between two objects
Signals a request for a service
Contains a signature which corresponds to the signature of an operation - a signature can include a name, optional parameters and optional return values.
* 
On a Sequence Diagram, you can also add an instance of an Operation as a Reply Message.
You can create an Operation in the following ways:
Through the context menu of a Class, Data Type, Interface, Model or Package.
Through the Operation button on the Class Diagram toolbar
Through the Items tab of a Class', Data Type's, Interface's, Model's or Package's Property Pages.
In addition, you can also create an Operation by copying an existing Operation. Modeler copies the Operation's links, child items and child diagrams. For more information, see Copying items.
* 
You can create a Return Type and Parameters for an Operation through its Signature. For more information, see Using an operation signature to specify properties and parameters. If an Operation's signature is greater than 200,000 characters, the Parameters' Default values are not included in the signature.
When used on a Class Diagram, an Operation's notation is as follows:
Abstract Operations are shown in italic text:
If the Operation has Constraints applied to it, you can show the Constraints through the View Options of the owning Class, Data Type or Interface – select the Show Constraints check box.
For information about the View Options available for this symbol, click one of the links below:
Class view options - class diagram
Data type view options - class diagram
Interface view options - class diagram
When used on a General Flow Diagram, you can link an Operation to an Action or Frame, and then show the Operation's Parameters, Exceptions and Return Type as pins on the diagram.
When used on a Concurrency Diagram, Communication Diagram, or Sequence Diagram, an Operation Message's notation is as follows:
The following notation is used for the arrow:
The following notation is used to show instance properties of an Operation Message on a Concurrency Diagram:
The following notation is used to show instance properties of an Operation Message on a Sequence Diagram:
In the Modeler panes, a short-cut symbol on the Operation's icon indicates that the item is a stub.
* 
If you select the UML\Operations folder in the Dictionary pane, the Contents pane displays the following information about each Operation in the model: Name, Parent, Access, Binding, Abstract, Immutable, Changed By or Changed On.
You create overloaded operations by creating two or more Operations that have the same Name and the same parent. Although the Name of each overloaded Operation is the same, the signature of each overloaded Operation should be unique.
The following sections provide information about how an Operation is used in the model. For more information about a property, item, model part or diagram, click it.
Properties
In addition to the standard properties, an Operation has these properties:
Abstract (Is Abstract through the automation interface)
Binding
Body
Data Type
Data Usage
Duration
Exception Order
Immutable
Language
Parameter Order (Param Order through the automation interface)
Post Conditions
Pre Conditions
Return Type (Data Type)
Signature
Synchronization
Visibility (Access through the automation interface)
An instance of an Operation (message) can have these properties:
Actual Parameters (Name)
Iterative
Latency
Result
Return Value
Sequence Number
Variable Name
Owned by
Class
Data Type
Interface
Model
Package —Note that on the Items tab of a Package's Property Pages, Operations are not listed in the All Package Items list.
Owns
Activity
Comment
Constraint
Dependency —The Dependency is owned jointly by the Operation and the other associated item. The access permissions you have to a Dependency are determined by the access permissions of the dependent item.
Parameter
An Operation can own the following diagrams
Communication Diagram
General Flow Diagram
Sequence Diagram
State Machine
Defined in these parts of the model
Class Model
Used in:
Concurrency Model
Object Interaction Model
Shown on these diagrams
Class Diagram
Instances of an Operation can appear on these diagrams.
Communication Diagram
Concurrency Diagram
General Flow Diagram
Sequence Diagram
State Diagram (as an activity)
Variant Diagram
For information about how the View Options affect the presentation of Operations, click one of the links below:
Class view options - class diagram
Data type view options - class diagram
Interface view options - class diagram
Can be linked to these dictionary items
Event
Exception —The linked Exception specifies alternative courses of action if the Operation is not performed successfully. Exceptions contain a number of parameters, which are used to transmit or receive data from Operations.
Event Action Block —The linked Event Action Block uses the Operation as a Call trigger. You can make this link by dragging an Operation to an Event Action Block.
Stereotype
* 
Can use these items as a data type
Basic Type
Class
Data Type
Exception
Signal
Type Definition
* 
When an Operation uses an item as a data type, Modeler creates a special link between the Operation and the referenced item. You cannot navigate this link through the Links Editor.