6.2.11.2 Actions
6.2.11.2.1 ActionState

The ActionState is used to indicate the current state of an Action execution. It is an enumeration of the possible states. The enumeration values are described in Table 81.

Table 81 – ActionState values
NameValueDescription
Idle0The Action is waiting for activation by a Requestor
Executing1The Action is managing an Action execution.
Done2The Action was completed,
The related return values of the last Action call are available

The ActionState representation in the AddressSpace is defined in Table 82.

Table 82 – ActionState definition
Attribute Value
BrowseNameActionState
IsAbstractFalse
References Node Class BrowseName DataType TypeDefinition Others
Subtype of Enumeration defined in OPC 10000-5
HasPropertyVariableEnumStringsLocalizedText []PropertyType
Conformance Units
PubSub Parameters PublishedDataSet Action
6.2.11.2.2 Action execution sequence

The Action execution sequence and the related ActionMetaData for an Action execution through a reliable transport protocol like MQTT is described in Figure 26.

Figure 26 – Action execution sequence reliable transport

The RequestId is unique within the context of a RequestorId and CorrelationData. Each Action request in a single NetworkMessage has a different RequestId. Multiple NetworkMessages with the same RequestorId and CorrelationData may be sent.

Multiple Responses may be sent in the same NetworkMessage if the corresponding requests have the same RequestorId and CorrelationData. The grouping of requests in NetworkMessages does not affect the grouping of Responses into NetworkMessages.

The Action execution sequence for an Action execution through a non-reliable transport protocol like UDP is described in Figure 27. The related ActionMetaData is described in Figure 26. It shows the use of the ActionState for a non-reliable transport protocol. The request and response messages are send in the PublishingInterval of the Responder as long as the ActionState requires the exchange of messages for a Action execution.

The state changes for Action execution are defined in Table 83 for the Requestor and in Table 84 for the Responder.

Table 83 – Action execution state changes Requestor
Current State Condition Event State for next message
IdleStart Action executionRequestor sends Request Message with ActionState = Executing.Executing
ExecutingPublishingInterval expired and no Done or Executing received from Responder.Requestor sends Request Message again with ActionState = Executing.Executing
ExecutingReceived Done from ResponderRequestor sends Request Message with ActionState = IdleIdle
DonePublisihingInterval expire and no Idle received.Requestor sends Request Message again with ActionState = Idle.Idle
DoneReceived Idle from ResponderNone
Table 84 – Action execution state changes Responder
Current State Condition Event State for next message
IdleReceives RequestMessage for a new combination of RequestorId, CorrelationData and RequestId.Begins processing Action.Executing
ExecutingPublishingInterval expired and Action execution is still in progress.Responder sends Response Message with ActionState = Executing, Status = Good and the payload is empty.Executing
ExecutingAction execution completed.Responder sends Response Message with ActionState = Done, Status = Action result and payload provided for Good and Uncertain Status and payload is empty for Bad Status.Done
DonePublishingInterval expired and did not receive Idle from Requestor yetResponder sends Response Message again with ActionState = Done until Idle is received from the Requestor or the time duration defined by the TimeoutHint request parameter ends.Done
DoneReceived Idle from RequestorNone
Figure 27 – Action execution sequence non-reliable transport

Errors during the execution of an Action are reported in the Status of the Action response message.

For some errors such as decoding errors for the request message, addressing errors or failing security checks, the Responder does not produce a response message. Therefore the Requestor should have an internal timeout setting to stop waiting for a response message.

6.2.11.2.3 Action specific use of parameters

The Action specific use of PubSub configuration parameters is defined in Table 85.

Note that the reliability of the protocol depends on the QoS levels supported by the protocol. Any Broker-based middleware that is using a QoS of AtLeastOnce or greater is reliable (see 6.4.2.5.4). Broker-less middle is not reliable if it does not support any DatagramQoS (see 6.4.1.2.6).

Table 85 – Action specific use of parameters
PubSubComponent Parameter Description
PubSubConnectionDataTypeReaderGroupsReaders are not used for Actions.
WriterGroupDataTypePublishingInterval

The value is 0 for reliable transport protocols.

The value shall be larger than 0 for non-reliable transport protocols.

The Requestor and Responder resends Action messages that have not been acknowledged by the receiver with this frequency.

KeepAliveTimeThis value is not used and set to 0.
HeaderLayoutUri

For JSON messages the JSON-NetworkMessage header layout URI is used (see A.3.4).

For UADP messages this value is UADP-Dynamic header layout URI is used (see A.2.2).

BrokerWriterGroupTransportDataTypeQueueNameThe address that the Requestor uses to send requests to the Responder.
RequestedDelivery‌GuaranteeShall be AtLeastOnce or better
UadpWriterGroupMessageDataTypeSamplingOffsetAlways -1.
NetworkMessageContentMaskBit 0: PublisherId is always 1
JsonWriterGroupMessageDataTypeNetworkMessageContentMask

Bit 0: NetworkMessageHeader is always 1.

Bit 1: DataSetMessageHeader is always 1.

Bit 2: SingleDataSetMessage is always 0.

Bit 3: PublisherId is always 1

Bit 5: ReplyTo is is always 0.

DataSetWriterDataTypeDataSetFieldContentMaskAlways 0.
KeyFrameCountAlways 0.
DataSetNameThe name of the ActionMetaData.
UadpDataSetWriterMessageDataTypeDataSetMessageContentMask

Bit 1: PicoSeconds is always 0.

Bit 2: Status is always 1, however, it is not sent in requests.

JsonDataSetWriterMessageDataTypeDataSetMessageContentMask

Bit 2: SequenceNumber is always 0.

Bit 4: Status is always 1, however, it is not sent in requests.

Bit 5: MessageType is always 0.

Bit 8: PublisherId is always 0

DatagramWriterGroupTransport2DataTypeMessageRepeatCountAlways 0
MessageRepeatDelayAlways 0
BrokerDataSetWriterTransportDataTypeQueueNameNot used.
RequestedDelivery‌GuaranteeNot used.
MetaDataQueueNameThe address used to send ActionMetaData Messages.