Semantics
A Stimulus is a communication between two Instances that conveys information with the expectation that action will ensue. A Stimulus will cause an Operation to be invoked, raise a Signal, or cause an Instance to be created or destroyed.
Procedure for creating stimulus
In order to create stimulus,
1. | Click [Toolbox] -> [Sequence] -> [Stimulus] button. |
![ch05_317](ch05_317.jpg)
2. | Drag from one object, and drop to the other(object or lifeline) in the [main window] in outgoing direction. |
![ch05_318](ch05_318.jpg)
3. | Stimulus quick dialog is opened. Enter the stimulus name at the quick dialog and press [Enter] key. |
![ch05_319](ch05_319.jpg)
4. | Finally, a stimulus is created as follows. |
![ch05_320](ch05_320.jpg)
Procedure for using operation in class as stimulus
If classifier property of receiver(object) of stimulus is assigned and you want to assign operation to stimulus,
2. | Click button at the quick dialog. |
![ch05_322](ch05_322.jpg)
3. | Select operation on the [Select an operation] dialog, and click [OK] button. |
![ch05_323](ch05_323.jpg)
4. | New stimulus mapped to class's operation is added as follows. |
![ch05_324](ch05_324.jpg)
Procedure for creating operation of class from object
To create operation of class as stimulus's receiver from object and assign it to stimulus,
1. | Double-click stimulus, click button at the quick dialog. |
![ch05_326](ch05_326.jpg)
2. | Enter new operation name to be created, and click [OK] button. |
![ch05_327](ch05_327.jpg)
3. | New operation is added to the class and text is filled at the quick dialog (This procedure is valid when there exists assigned class.). Press [Enter] key. |
![ch05_329](ch05_329.jpg)
4. | See [model explorer] to confirm creation of new operation. |
![ch05_330](ch05_330.jpg)
Procedure for creating previous stimulus of current stimulus by using shortcut creation syntax
In order to create previous stimulus to current stimulus,
1. | Double-click a stimulus, or select a stimulus and press [Enter] key. |
![ch05_331](ch05_331.jpg)
2. | At the quick dialog, After "~>" string("<~" for incoming stimulus), enter target object name and stimulus name. |
![ch05_332](ch05_332.jpg)
3. | Press [Enter] key, and then new object and stimulus are created and arranged above selected stimulus. |
![ch05_333](ch05_333.jpg)
Procedure for creating next stimulus to current stimulus by using shortcut creation syntax
In order to create next stimulus to selected stimulus,
1. | Double-click a stimulus, or select a stimulus and press [Enter] key. |
![ch05_334](ch05_334.jpg)
2. | At the quick dialog, After "_>" string("<_" for incoming stimulus), enter target object name and stimulus name. |
![ch05_335](ch05_335.jpg)
3. | Press [Enter] key, and then new object and stimulus are created and arranged next to selected stimulus. |
![ch05_336](ch05_336.jpg)
Procedure for creating sub stimulus by using shortcut creation syntax
In order to create a sub stimulus of selected stimulus,
1. | Double-click a stimulus, or select a stimulus and press [Enter] key. |
![ch05_337](ch05_337.jpg)
2. | At the quick dialog, After "->" string("<-" for incoming stimulus), enter target object name and sub stimulus name. |
![ch05_338](ch05_338.jpg)
3. | Press [Enter] key, and then new object and stimulus are created and arranged on the bottom of selected stimulus's activation. |
![ch05_339](ch05_339.jpg)
Procedure for reconnecting to another object
In order to reconnect stimulus to another object,
1. | Click the end of stimulus. |
![ch05_340](ch05_340.jpg)
2. | Drag the end of stimulus and drop it to another object. |
![ch05_341](ch05_341.jpg)
3. | Then stimulus will be connected to another object. |
![ch05_342](ch05_342.jpg)
Procedure for changing ActionKind of stimulus
The [ActionKind] property of stimulus should be assigned to one of five sort as following. To change [ActionKind] property, select stimulus and select the [ActionKind] property on the properties window.
ActionKind
|
Shape
|
CALL
|
![ch05_343](ch05_343.jpg)
|
SEND
|
![ch05_344](ch05_344.jpg)
|
RETURN
|
![ch05_345](ch05_345.jpg)
|
CREATE
|
![ch05_346](ch05_346.jpg)
|
DESTROY
|
![ch05_347](ch05_347.jpg)
|
|