Action Types

Action elements are extremely versatile. Enterprise Architect supports a wide range of specific Action types that you can use to represent or enact a discrete object, operation or behavior. Actions of most types are depicted as a round-cornered rectangle containing the Action type and Action name, as shown.

ActionType
 

Certain types have their own specific notation; for example:

Action Kind

Notation

See also

AcceptEvent

Action-AcceptEvent

 

 

 

 

 

AcceptEvent Actions

AcceptEventTimer

Action-AcceptEventTimer

 

CallBehavior

Action-CallBehaviour

 

CallBehavior Action

CallOperation

Action-CallOperation

 

Class Operations in Diagrams

SendSignal

Action-SendSignal

 

SendSignal Action & BroadcastSignal Action

AcceptEvent Actions

An Accept Event Action element has a selectable output result Action Pin assigned to it, and one or more Triggers to denote the type of events accepted by the Action You define the Triggers on the Triggers page of the Properties dialog. In a simulation, an AcceptEvent Action without a Trigger will block the simulation at the Action element.

Field

Action

See also

Name

Type in the name of the trigger.

 

 

Type

Click on the drop-down arrow and select the type of trigger: Call, Change, Signal or Time:

Call - specifies that the event is a CallEvent, which sends a message to the associated object by invoking an operation
Change - specifies that the event is a ChangeEvent, which indicates that the transition is the result of a change in value of an attribute
Signal - specifies that the event is a SignalEvent, which corresponds to the receipt of an asynchronous signal instance
Time - corresponds to a TimeEvent; which specifies a moment in time

 

Code generation for State Machines currently supports Change and Time trigger events only, and expects a specification value.

In simulation, each Trigger should have a Signal. The result will be the Accept signal.

 

 

Specification

Specify the event instigating the Transition.

For an AcceptEventTimer Action, you can type a JavaScript expression in this field evaluating to the number of ticks to wait for.

 

 

SendSignal Action & BroadcastSignal Action

A SendSignal Action has an assigned target ActionPin and a Signal. The Signal can have input ActionPins that bind its attribute parameters as arguments. For example:

 

::Sender: sig.binding_To_s1: Integer

 

 

In a model simulation, a SendSignal Action will transfer the values of the arguments into the attributes of the created Signal instance. The target ActionPin can have an empty object, to send the Signal into the root of the simulation space. If there is no target ActionPin, simulation will stop at the Action. If the target has an Object, the Signal will be sent to the Object. You must specify the Pin type of the target ActionPin in the classifier of the Object.

A BroadcastSignal Action is similar to a SendSignal Action, except that it does not have a target ActionPin. In a simulation, it always sends its Signal to the root of the simulation data.

You can model the Signal to be sent and the associated arguments to be conveyed, using the Signal tab of the element Properties dialog.

Field/Button

Action

Signal

Click on the (  ...  ) button and select the required signal from the Select Signal dialog.

 

Attribute

Click on the drop-down arrow and select the attribute (as previously created in the Signal element) with which the arguments are to be associated.

 

Value

Type the appropriate value for the attribute.

 

Add

Click on this button and select the appropriate ActionPins from the Select Pin dialog, to identify the arguments for the Signal.

To assign more than one ActionPin, press ( Ctrl )  whilst you select each one.

 

Save

Click on this button to save your changes.

 

CallBehavior

A CallBehavior Action has a behavior such as an Activity, and a selectable ActionPin result that will put the return value. The CallBehavior Action can also transfer the values of its argument ActionPins into its behavior, if they are bound together. In a simulation, if the Action has no behavior, the simulation is blocked.

SendObject Action

A SendObject Action sends a copy of an Object from the requesting ActionPin to the target ActionPin. In a simulation, the SendObject Action must have both ActionPins, otherwise the simulation is blocked at the Action.

Structural Feature Actions

A StructuralFeature Action acts upon a modeling structural feature, such as a Port, Part or attribute of an Activity or of the classifier of an Object, which you identify within the Action element.  Enterprise Architect supports the following types of Structural Feature Actions.

Action

Description

AddStructuralFeatureValue

Requires an object input ActionPin where the target object will be entered, and a result output ActionPin to hold the read result. If the object Port has no value at run time, the process will pause at the Action.

In your model design, the Port should be connected to the Port of an Object or to an Object Node of an Activity. The properties of the Port or Object Node must be correctly set, and the value Port must be set up to capture the input value when the Action takes effect.

The result ActionPin can be connected to an input consume Port or ActionPin. For example, it can be used at the next WriteStructuralFeature Action as the input value.

 

ClearStructuralFeature

Clears the single value of a structural attribute or a structural Port of an Object or an Activity, and sets the value of the structural feature to null.

 

ReadStructuralFeature

Resembles AddStructuralFeatureValue, except that the value Port is not necessary.

In a simulation, if the Object's Port has no value at run time, the simulation will pause at the Action.

 

RemoveStructuralFeatureValue

Similar to ClearStructuralFeature except that it invokes a value ActionPin to input a value and, if that value matches the value of the specified structural feature, it sets the value to null.

If the values do not match, the Action does not clear the structural feature value.

 

WriteStructuralFeature

Identical to AddStructuralFeatureValue. In a simulation, the value Port must be set up to capture the input value when the simulation runs the Action.

 

Access    Right-click Action element | Advanced | Set Structural Feature: Add

Step

Action

1

On the Select Property dialog (a variant of the Select <Item> dialog), browse or search for the appropriate structural feature, and double-click on it.

The feature name and location displays in the structuralFeature field of the Set Structural Feature dialog.

 

2

Click on the OK button to save the setting.

 

ReadSelf

A ReadSelf Action reads its own host object name into its result Port. You must set an output ActionPin for the result.

ReadSelf

The Action must be within a Class, which is instanced during run time. When a simulation passes the Action, it puts the name of the instance of the Class into the result Port.

ReadSelf is one of a group of Object Actions, with CreateObject and DestroyObject.

Learn more