![]() |
![]() |
![]() |
![]() |
![]() |
Adding and Removing Objects
The topics discussed in this section are:
- Adding and Placing Symbols
- Adjusting Objects to the Grid
- Inserting Space for Events
- Inserting Space for Events Automatically
- Removing Space between Events
- Removing Objects
- Adding a Text Symbol
- Adding a Comment Symbol
- Adding an Instance Head Symbol
- Adding an Instance End Symbol
- Adding a Stop Symbol
- Adding a Condition, MSC Reference or Inline Expression Symbol
- Adding an Action Symbol
- Adding a Coregion Symbol
- Drawing a Message
- Drawing a Message-to-self
- Drawing a Timer
- Drawing a Process Create
Adding and Placing Symbols
- You can add a symbol from the symbol menu to a chart in two ways:
- Automatically, by double-clicking the symbol in the symbol menu. The symbol will be placed at a location defined according to the type of symbol and in relation to the current selection. This will be further described for each symbol type.
- Manually, by first selecting it in the symbol menu and then clicking at the desired location in the drawing area. To cancel the operation before the symbol is added, press <Esc>.
- Enter the symbol's text attributes.
Adjusting Objects to the Grid
The MSC Editor positions symbols and lines automatically. When you draw and move symbols and lines, each object is positioned on the closest intersection in the grid.
Inserting Space for Events
When you work on an MSC, the space available between two events on an instance axis may not be sufficient for inserting new objects on the instance axis. The MSC Editor can reorganize the MSC in order to provide the required space.
- From the Edit menu, select Make Space. Alternatively click the quick-button for Make space for new events. The Make Space dialog is issued.
- Turn the appropriate radio button on, depending on if you have selected the object before or after where to insert space.
- Type in the required number of events to insert (the default is 1 event). A negative number implies removal of space.
- Click OK. The MSC is rearranged and space is created on the instance axis/axes.
Inserting Space for Events Automatically
Space is made on the instance axis when you select and add new symbols from the symbol menu or when you move symbols in the diagram.
- Select a symbol in the symbol menu and move the cursor to the place on the instance axis where you want to insert the symbol.
- Click the mouse. The MSC is rearranged and space is created on the instance axis/axes.
Removing Space between Events
Removing Objects
You can remove any selected object(s) this way:
- Select the objects to remove.
- Choose Clear from the Edit menu. The objects are removed.
Selecting an object to clear may implicitly select other objects. The Clear command will delete them all. See Figure 334.
Clearing the instance Instance_1 will also remove the messages Message 1 and Message 2.
Adding a Text Symbol
To add a text symbol automatically, double-click the text symbol in the symbol menu. The text symbol will be placed at the first available position at the top of the drawing area, starting from the left of the diagram.
Adding a Comment Symbol
The following conditions apply to comment symbols in the MSC Editor:
- A comment symbol can only be connected to one symbol or event.
- Only one comment symbol may be connected to an object.
- A comment symbol cannot be connected to another comment symbol or a text symbol.
To add a comment symbol automatically:
- Select the object to which you wish to connect the comment.
- Double-click the comment symbol in the symbol menu. The comment symbol will be placed to the right of the selected object and be connected to it. (If no object was selected, the comment symbol will be placed at an empty position, and you will have to connect the symbol to an object manually, as described next.)
To add a comment symbol manually:
- Select the comment symbol in the symbol menu and place it in the drawing area.
- Click the handle on the comment symbol, and then click on the object you wish to comment. A dashed line is drawn between the objects.
Adding an Instance Head Symbol
You can add a new instance either directly by using the instance head symbol, or you can visualize an instance that is started dynamically by using the process create line. The latter approach is described in Drawing a Process Create.
To add an instance head symbol automatically:
- Select, if you wish, an object to use as reference point when positioning the instance head.
- Double-click the instance head symbol in the symbol menu.
- Fill in the instance head text fields. See Figure 335.
Adding an Instance End Symbol
The instance end symbol determines the end of the description of an instance within an MSC. It does not describe the actual termination of the instance. That is done with the stop symbol, see Adding a Stop Symbol.
If you position the instance end symbol above (before) a symbol or line on the instance axis, all symbols and lines below (after) that object will be deleted. This is also true when you add a stop symbol:
.
The placement of the instance end symbol deletes message Message2 but not Message1.
To add an instance end symbol automatically:
- Select an object on the instance axis immediately above (before) the desired endpoint.
- Double-click the instance end symbol in the symbol menu.
Adding a Stop Symbol
The stop symbol at the end of an instance body indicates the termination of that instance, as opposed to the instance end symbol, which only determines the end of the description of the instance within the MSC.
If you position the stop symbol above ("before") a symbol or line on the instance axis, all symbols and lines below ("after") that object will be deleted. See Figure 336.
To add a stop symbol automatically:
- Select an object on the instance axis immediately above (before) the desired endpoint.
- Double-click the stop symbol in the symbol menu.
- The instance axis line is truncated and is connected to the stop symbol.
Drawing a Message
To draw a message you need to know from which instance it should be issued (the source instance) and to which instance it should be sent (the target instance).
Drawing a Message Automatically
- Select the object on the source instance axis immediately above (before) the place where you wish to draw the line.
- Double-click the message symbol in the symbol menu. The MSC Editor inserts the base end of the message on the instance axis, with the target end of the message (the arrow) marked as unconnected (lost) and facing right. (Figure 337)
- Drag the target end to (or close to) the target instance axis and release the mouse button to connect the line. If you do not connect the end of the message, it will remain unconnected (lost), indicated by the filled circle.
- Enter the message name and its parameters.
Drawing a Message Manually
- Click the message symbol in the symbol menu.
- To create a message or lost message:
- Point at the source instance axis and click once (the circle indicating a found message disappears when you are close enough to an instance axis). From now on, the base of the message is fixed to the source instance. The message is displayed as lost, following the mouse motion. (See Figure 337.)
- Point between two instance axes and click once. The base of the message is fixed at this position.
- Point at or close to the target instance axis, and click to connect the message end to the target instance. The line is connected pushing down subsequent symbols on the instance axis when necessary.
- Enter the message name and message parameters.
Inserting the Message Name and Message Parameters
- The message name can be entered immediately.
- Click the parameter selection rectangle (the lower one) so that it is the only selected object. Type the parameter list. The parenthesis around the parameter list are not displayed on the screen until you have entered a parameter.
Drawing a Message-to-self
Drawing a message-to-self is done similarly to drawing a message. (See Drawing a Message.) The source instance is however always the same as the target instance.
Adding a Condition, MSC Reference or Inline Expression Symbol
Adding a Condition, MSC Reference or Inline Expression Symbol Automatically
- Select the object immediately above (before) the place on the instance axis where you wish to insert the symbol.
- Double-click the condition, MSC reference or inline expression symbol in the symbol menu.
- Type the condition or MSC reference name, or fill in the inline expression text.
- Connect the condition to the instances. See Connecting the Condition or MSC Reference Symbol.
Adding a Condition, MSC Reference or Inline Expression Symbol Manually
- Select the condition, MSC reference or inline expression symbol in the symbol menu.
- Position the symbol at the desired point of the instance axis. The symbol is placed on the instance axis, pushing down subsequent symbols on the instance axis when necessary.
- Type the condition or MSC reference name.
- Connect the symbol to the instances. See Connecting the Condition or MSC Reference Symbol.
Connecting the Condition or MSC Reference Symbol
In the MSC Editor you can connect the condition or MSC reference symbol to individual instances or perform a global connection.
When a symbol straddles an instance axis to which it is not connected, the axis line is drawn through the symbol. In Figure 340 the condition symbol with name Condition_name is connected to the instances a and c, but not to the instance b.
To connect a condition or MSC reference to a number of instance axes:
- Select the symbol to connect.
- Select Connect from the Edit menu. The Connect dialog is opened:
- Select the instances to be connected in the instance list. The instances that will be connected are highlighted.
Drawing a Timer
Drawing a timer is done similarly to drawing a message line. The source instance is always the same as the target instance.
Drawing a Timer Automatically
- Select the object on the instance axis immediately above (before) the place where you wish to draw the timer.
- Double-click the timer symbol in the symbol menu. The MSC Editor inserts the timer.
- Drag the target end and release the mouse when you have reached the point where the timer should expire.
- If required, change the status of the timer by selecting Status from the Edit menu (see Changing the Status of a Timer).
- Enter the timer name and its parameters.
Drawing a Timer Manually
- Click the timer symbol in the symbol menu.
- Point at or close to the instance axis. Click once. The base of the timer is fixed and the timer is displayed as a vertical line, following the mouse motion.
- Point at or close to the point on the axis where the timer should expire and click to connect the timer end. The timer end is connected and the timer is assigned the status timeout.
- Enter the timer name and parameters.
Drawing a Separate Timer Manually
- Draw a timer.
- Select one of the outermost selection squares (i.e. the selection squares not on the instance axis) and drag it so that the vertical extension of the timer disappears.
- Enter the timer name and parameters.
Changing Between Timer and Separate Timer
- Change a timer to a separate timer by selecting one of the outermost selection squares (i.e. the selection squares not on the instance axis) and dragging it so that the vertical extension of the timer disappears.
- Change a separate timer to a timer by selecting a selection square and dragging it vertically.
Inserting the Timer Name and Timer Parameters
- The timer name can be entered immediately.
- Click the parameter selection rectangle (the lower one) so that it is the only selected object. Type the timer parameters. The parenthesis around the timer parameters are not displayed on the screen until you have entered a parameter.
Changing the Status of a Timer
Z.120 specifies two appearances for the timer symbol, depending on whether the timer has expired (i.e. timeout) or whether the timer is reset.
- Timeout - A timer expires.
- Reset - A timer is stopped.
- Implicit reset - A timer is assigned a new value while active.To change the status of a timer:
- Select the timer.
- From the Edit menu, select Status. The Timer status dialog is issued.
Changing the Status of a Separate Timer
The status of a separate timer:
- Set - A timer is activated but has not yet expired.
- Timeout - A timer expires.
- Reset - A timer is stopped.
To change the status of a timer:
- Select the timer.
- From the Edit menu, select Status. The Timer status dialog is issued.
Adding an Action Symbol
An action symbol corresponds to the SDL task symbol. You may choose to fill it with formal or informal expressions.
To add an action symbol automatically:
- Select the object on the desired instance axis immediately above (before) the place where you wish to insert the symbol.
- Double-click the action symbol in the symbol menu. The symbol is placed on the instance axis, pushing down subsequent symbols when necessary.
- Fill in the action text.
Drawing a Process Create
Drawing a Process Create Automatically
- Select the object on the source instance axis immediately above (before) the place where you wish to draw the process create.
- Double-click the create process line in the symbol menu. The editor draws the create process line and places the instance head to the right of the source instance axis.
- Enter the create parameters and the created instance head text fields (see Figure 335).
Drawing a Process Create Line Manually
- Click the process create symbol in the symbol menu.
- Click once on the source instance axis. The base of the process create line is fixed to the source instance. The line is displayed as a dashed line.
- Click at the location where you wish to place the head of the created instance. The instance head and instance axis are automatically drawn.
- Enter the create parameters and the created instance head text fields.
Adding a Coregion Symbol
The coregion allows you to specify unordered events on an instance. A coregion covers for instance the practically important case of two or more incoming messages where the ordering of consumption may be interchanged.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |