Each JSON Action NetworkMessage can contain one or more JSON Request or Response messages. A JSON Action NetworkMessage is a JSON object with the fields defined in Table 192.

Table 192 – JSON Action NetworkMessage definition

Name

Type

Description

MessageId

String

A globally unique identifier for the message. This value is mandatory.

MessageType

String

This value shall be “ua-action-request” Request messages or “ua-action-response” for Response messages.

This value is mandatory.

PublisherId

String

The PublisherId of the Responder for the “ua-action-request” and “ua-action-response” message.

This value is mandatory.

Timestamp

UtcTime

When the message was first sent to the Middleware.

This value is mandatory.

ResponseAddress

String

The address used to send the Response messages. The handling of the ResponseAddress and default values are defined for the different transport protocol mappings.

This value is mandatory for Request messages.

This value shall be omitted for Response message.

CorrelationData

ByteString

Data provided by the Requestor in the Request message that is returned to the Requestor in the Response message.

The value may be provided in the Request message.

The value shall be provided in the Response message if it was included in the Request message.

RequestorId

String

The PublisherId of the Requestor for the “ua-action-request” and “ua-action-response” message.

This value is mandatory.

TimeoutHint

Duration

The timeout used by the Requestor to wait for a Response messages and by the Responder to stop processing the request.

This value is mandatory for the Request message.

This value is not used for Response messages.

Message

*

A JSON array of JSON ActionRequest or JSON ActionResponse messages.

This value is mandatory.

It contains one or more ActionRequest or ActionResponse messages with a layout defined by the Request and Response fields in the ActionMetaData.

The Action execution sequences and execution related request and response message values are defined in 6.2.11.2.

A NetworkMessage with MessageType “ua-action-request” contains a JSON array with ActionRequest messages. A ActionRequest message is a JSON object with the fields defined in Table 193.

Table 193 – JSON ActionRequest definition

Name

Type

Description

DataSetWriterId

UInt16

An identifier for DataSetWriter in the Responder which creates the Response.

This value is mandatory.

It is unique within the scope of a Responder.

ActionTargetId

UInt16

The numeric identifier assigned to the Action target which is unique within one ActionMetaData.

This value is mandatory.

It is used to address the Action target in combination with the PublisherId and the DataSetWriterId.

DataSetWriterName

String

The name of the DataSetWriter which created the DataSetMessage.

The presence of the value depends on the setting in the JsonDataSetMessageContentMask.

WriterGroupName

String

The name of the WriterGroup which created the DataSetMessage.

The presence of the value depends on the setting in the JsonDataSetMessageContentMask.

The value shall be omitted if the WriterGroupName is contained in the NetworkMessage header.

MetaDataVersion

ConfigurationVersionDataType

The version of the ActionMetaData Request which describes the contents of the Payload.

The presence of the value depends on the setting in the JsonDataSetMessageContentMask.

MinorVersion

VersionTime

The minor version of the ActionMetaData Request which describes the contents of the Payload.

The presence of the value depends on the setting in the JsonDataSetMessageContentMask.

The value shall be omitted if the MetaDataVersion is contained in the DataSetMessage header.

Timestamp

DateTime

The time the Request was created.

The presence of the value depends on the setting in the JsonDataSetMessageContentMask.

MessageType

String

“ua-action-request”

The presence of the value depends on the setting in the JsonDataSetMessageContentMask.

RequestId

UInt16

Data provided by the Requestor in the Request message that is returned to the Requestor in the Response message.

ActionState

ActionState

Specifies the expected Action state on Responder side.

The details for the use of this value and the relation to other values for a Action execution is defined in 6.2.11.2.

Payload

Object

A JSON object containing the name-value pairs specified by the ActionMetaData.

The format of the value depends on the DataType of the field and the flags specified by the DataSetFieldContentMask.

Only Variant or RawData encoding shall be allowed. If bits for DataValue encoding are set, the Variant encoding shall be used.

The encoding rules defined in 7.2.5.4 for DataSetMessages also apply to the ActionRequest message. The DataValue encoding shall not be used in ActionRequest message. The RawData flag shall be FALSE for ActionRequest messages.

A NetworkMessage with MessageType “ua-action-response” contains a JSON array with ActionResponse messages. An ActionResponse message is a JSON object with the fields defined in Table 194.

Table 194 – JSON ActionResponse definition

Name

Type

Description

DataSetWriterId

UInt16

An identifier for DataSetWriter which created the Response.

This value is mandatory.

It is unique within the scope of a Responder.

ActionTargetId

UInt16

The numeric identifier assigned to the Action target which is unique within one ActionMetaData.

This value is mandatory.

It is used to address the Action target in combination with the PublisherId and the DataSetWriterId.

DataSetWriterName

String

The name of the DataSetWriter which created the DataSetMessage.

The presence of the value depends on the setting in the JsonDataSetMessageContentMask.

WriterGroupName

String

The name of the WriterGroup which created the DataSetMessage.

The presence of the value depends on the setting in the JsonDataSetMessageContentMask.

The value shall be omitted if the WriterGroupName is contained in the NetworkMessage header.

MetaDataVersion

ConfigurationVersionDataType

The version of the ActionMetaData Response which describes the contents of the Payload.

The presence of the value depends on the setting in the JsonDataSetMessageContentMask.

MinorVersion

VersionTime

The minor version of the ActionMetaData Response which describes the contents of the Payload.

The presence of the value depends on the setting in the JsonDataSetMessageContentMask.

The value shall be omitted if the MetaDataVersion is contained in the DataSetMessage header.

Timestamp

DateTime

The time the DataSetMessage was created.

The presence of the value depends on the setting in the JsonDataSetMessageContentMask.

Status

StatusCode

The overall result of the Action Response.

The value shall be present.

MessageType

String

“ua-action-response”.

The presence of the value depends on the setting in the JsonDataSetMessageContentMask.

RequestId

UInt16

Data provided by the Requestor in the Request message that is returned to the Requestor in the Response message.

ActionState

ActionState

The current state of this currently running Action.

The details for the use of this value and the relation to other values for a Action execution is defined in 6.2.11.2.

Payload

Object

A JSON object containing the name-value pairs specified by the ActionMetaData.

The format of the value depends on the DataType of the field and the flags specified by the DataSetFieldContentMask.

Only Variant or RawData encoding shall be allowed. If bits for DataValue encoding are set, the Variant encoding shall be used.

The encoding rules defined in 7.2.5.4 for DataSetMessages also apply to the ActionResponse message. The DataValue encoding shall not be used in ActionResponse message. The RawData flag shall be FALSE for ActionResponse messages.