public abstract class Action extends StringAttribute
When the FSMActor is fired, an enabled transition among the outgoing transitions of the current state is chosen. The choice actions contained by the chosen transition are executed. An action is a choice action if it implements the ChoiceAction marker interface. A choice action may be executed more than once during an iteration in domains with fixed-point semantics.
When the FSMActor is postfired, the chosen transition of the latest firing of the actor is committed. The commit actions contained by the transition are executed and the current state of the actor is set to the destination state of the transition. An action is a commit action if it implements the CommitAction marker interface.
ChoiceAction
,
CommitAction
,
Transition
,
FSMActor
,
Variable
NamedObj.ContainedObjectsIterator
Settable.Visibility
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
EXPERT, FULL, NONE, NOT_EDITABLE
Constructor and Description |
---|
Action(NamedObj container,
java.lang.String name)
Construct an action with the given name contained by the
specified container.
|
Action(Workspace workspace)
Construct an action in the specified workspace with an empty
string as a name.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
execute()
Execute the action.
|
abstract java.util.List |
getDestinations()
Return the list of destinations of assignments in this action.
|
void |
setContainer(NamedObj container)
Set the container of this action.
|
_propagateValue, addValueListener, clone, exportMoML, getExpression, getVisibility, removeValueListener, setExpression, setVisibility, validate
getDefaultExpression, getValueAsString
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _description, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDisplayName
description, getContainer, getFullName, getName, getName, setName
public Action(Workspace workspace)
workspace
- The workspace that will list the attribute.public Action(NamedObj container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of this action.IllegalActionException
- If the action is not of an
acceptable class for the container, or if the name contains
a period.NameDuplicationException
- If the container already
has an attribute with the name.public abstract void execute() throws IllegalActionException
IllegalActionException
- If the action cannot be
successfully completed.public abstract java.util.List getDestinations() throws IllegalActionException
IllegalActionException
- If the destination list cannot be
constructed.public void setContainer(NamedObj container) throws IllegalActionException, NameDuplicationException
setContainer
in class Attribute
container
- The proposed container.IllegalActionException
- If setting the container
would result in a recursive containment structure, or if this
action and container are not in the same workspace, or if the
argument is not an instance of Transition or null.NameDuplicationException
- If the container already has
an attribute with the name of this action.Attribute.getContainer()