===== The Element ===== ==== Definition and Usage ==== The [[simpleaction|]] element defines a simple action triggered by the evaluation of a causal relationship condition. The [[simpleaction|]] element has a //role// attribute, whose value must be unique in the connector’s role set. A role is a connector interface point, which is associated to node interfaces by a link that refers to the connector. A [[simpleaction|]] also defines an event type (//eventType// attribute) and which action must be applied to the event state machine it refers (//actionType// attribute). The //eventType// and //actionType// values may be inferred by the role value if reserved words are used as values. Otherwise, the //eventType// and //actionType// attributes are required. Reserved action role values associated to event state machines: ^ Role Value ^ Action Type ^ Event Type ^ | start | start | presentation | | stop | stop | presentation | | abort | abort | presentation | | pause | pause | presentation | | resume | resume | presentation | | set | start | attribution | If an //eventType// value is "attribution", the [[simpleaction|]]must also define the value to be assigned, through its //value// attribute. If the //value// is specified as "$anyName" (where "$" is a reserved symbol and "anyName" is any string, except reserved role names), the assigned value is retrieved from the property associated with the //role// "anyName" and defined by a [[bind|]] child element of the [[link|]] element that refers the connector. If this value cannot be retrieved, no attribution is made. This is the single possible case of a [[bind|]] element referring to a role that is not explicitly declared in a connector. The role cardinality specifies the minimal (//min// attribute) and maximal (//max// attribute) number of participants that may play the role (that is, the number of binds) when the [[causalconnector|]] is used for creating a [[link|]]. If the max value is greater than one, the //qualifier// attribute may be specified informing the logical relationship among the simple action binds: "par" or "seq". When the sequential "seq" qualifier is used, actions must be fired in the specified order. However, an action does not need to wait the previous one to be finished in order to be fired. When the parallel "par" qualifier is used, actions can be performed in any order. A //delay// attribute may also be defined for a [[simpleaction|]], specifying that the action must be fired only after waiting for the specified time. The [[simpleaction|]] may also define a //repeat// attribute to be assigned to the //repetitions// attribute of the event, and a //repeatDelay// to be waited before repeating the action. The [[simpleaction|]] element may also define the duration and by attributes if its //eventType// value is "attribution" and only if the referred property defines numerical values or colors. When setting a new value to a property the change is instantaneous by default (//duration// is 0), but the change may also be carried out during an explicitly declared duration, specified by the //duration// attribute. The change from the old value to the new one may be linear by default (//by// is "indefinite"), or carried out step by step, with the pace specified by the //by// attribute. ==== Syntax ==== ^ Element ^ Attributes ^ Content ^ Parent ^ | [[simpleaction|]] | __//role//__, //delay//, //eventType//, //actionType//, //value//, //min//, //max//, //qualifier//, //repeat//, //repeatDelay//, //duration//, //by// | -- | [[causalconnector|]] or [[compoundaction|]] | ==== Attributes ==== ^ Name ^ Value ^ Description ^ | //role// | String. | The //role// attribute defines a connector interface point, which is associated to node interfaces by a link that refers to the connector. The //role// value must be unique within the set of roles of the connector. | | //delay// |

The //delay// attribute is be specified according with one of the following syntax:

  1. <"Hours:Minutes:Seconds.Fraction">, where "Hours" is an integer in the [0,23] interval, "Minutes" is an integer in the [0,59] interval, "Seconds" is an integer in the 0,59 interval, and "Fraction" is a positive integer,
  2. Seconds<"s">, where "Seconds" is a positive real number.

The default value is "0s".

| The //delay// attribute defines a time delay to be awaited before triggering the action. | | //eventType// | "presentation", "selection", or "attribution". | The //eventType// attribute identifies the type of event for the action or condition. | | //actionType// | "start", "stop", "abort", "pause", or "resume". | The //actionType// attribute specifies the action to trigger the corresponding transition in the event state machine of the referred event. | | //value// | String | The //value// attribute defines a value to be set to the property bound to the attribution simple action. | | //min// |

Positive integer lesser than or equal to the //max// value.

The default value is 1.

| The //min// attribute defines the minimum number of participants that may play the role. | | //max// |

Positive integer greater than or equal to the //min// value, or the "unbounded" value.

The default value is 1.

| The //max// attribute defines the maximum number of participants that may play the role. | | //qualifier// | "seq" or "par". The default value is "par". | The //qualifier// attribute defines the order that actions must be applied in the simple action binds. | | //repeat// | Positive integer. The default value is 0 | The //repeat// attribute defines a value to be assigned to the repetitions attribute of the event defined in the [[simpleaction|]] element. | | //repeatDelay// | Same as for //delay//. | The //repeatDelay// attribute specifies a time interval to be waited before repeating the action. | | //duration// | The //duration// attribute is specified as Seconds<"s">, where "Seconds" is a positive real number. | The //duration// attribute establishes the time an attribution must last when changing from the old value to the new one. | | //by// |

A real number or "indefinite".

The default value is "indefinite".

| The //by// attribute establishes how the change made by an attribution action from an old value to the new one occurs: if linearly (by is "indefinite") or carried out step-by-step, with the pace specified by the //by// attribute. |