ibm Rational Rhapsody 7.5 — Defining the features of a primitive operation

Classes and types Primitive operations A primitive operation is one whose body you define yourself instead of letting Rational Rhapsody generate it for you from a statechart. Creating a primitive operation To create a primitive operation using the Features window for a class: 1. On the Rational Rhapsody browser, double-click a class to open its Features window. 2. On the Operations tab, either click the row in the list of operations or click the New button in the upper, right corner of the window and select PrimitiveOperation . The new row is filled in with the default values. 3.

By default, Rational Rhapsody names the new primitive operation Message_n , where n is greater than or equal to 0. Type the new name for the operation in the Name column. 4. Change the other default values as necessary. 5. Click OK . Alternatively, you can create a primitive operation through the use of the Rational Rhapsody browser, as follows: 1. In the Rational Rhapsody browser, right-click the class, actor, operation, or use case node to which you want to add the operation and select Add New > Operation . Alternatively, you can select the item and choose Edit > Add New > Operation from the menu bar. 2. Rename the operation.

Defining the features of a primitive operation The Features window for a primitive operation enables you to change the features for it, including its return values, arguments, and modifiers. On the General tab, you define the general features for a primitive operation through the various controls on the tab. Notice that the signature for the primitive operation is displayed at the top of the General tab of the Features window. Љ In the Name box you specify the name of the element. The default name is Message_n , where n is an incremental integer starting with 0. To enter a detailed description of the operation, use the Description tab.

Љ You use the L button to open the Name and Label window to specify the label for the element, if any. For information on creating labels, see Descriptive labels for elements for information on creating labels. 72 User Guide