Action declaration

Action is a named group of instructions meant to be executed in succession and belongs to a particular state of an Object. Action is invoked from outside the object by DO instructions in other objects or by external commands. These commands are placed on the object's action queue and are executed by Scheduler in due course. The object will execute the action only when it is in the appropriate state.

Actions for the particulat state are declared just after State declaration. (see below) The declaration of an action begins with the keyword Action followed by a colon.
Then follows the action's name. This has to be unique among the state's actions.

Action can accept parameters. When the action has parameters then parameter declaration will follow. More about parameters-declaration see Parameters in SMI.

For a logical object the ACTION declaration must be followed by the instructions (executable statements) that the object performs at reception of the command. On the other hand, an associated object does not execute any action but sends the command as a message string to the associated process; therefore there are no executable statements following the ACTION declaration.

Action Declaration Syntax:

Action: action-name [( parameters-declaration )]

SML Instructions


Placement of Action Declarations

Object : obj-name Parameters : .... .... State : state1 ... State : statei Action: action1 ... Action: actioni ...