Skip to content
Stand with Ukraine flag

RPC Call Reply

Use this node to send the current message data as a reply to a device-originated RPC request — for example, returning computed server data to a device that called getReferenceData, or confirming a command execution back to the requesting device.

  • Service Id — metadata key that holds the service identifier. Default: serviceId.
  • Session Id — metadata key that holds the session identifier. Default: sessionId.
  • Request Id — metadata key that holds the request identifier. Default: requestId.
  1. Verify that the originator is a DEVICE. If not, route via Failure.
  2. Extract serviceId, sessionId, and requestId from message metadata. If any is missing, route via Failure.
  3. Verify that message data is not empty. If empty, route via Failure.
  4. Check for an edgeId in message metadata:
    • Present: save the reply to the edge event queue for asynchronous delivery to the edge device.
    • Absent: send the reply directly to the device via the RPC service.
  5. Route the original message via Success.
ConnectionCondition
SuccessReply sent (or queued for edge delivery). Outgoing message is unchanged.
FailureOriginator is not a DEVICE, missing serviceId/sessionId/requestId, empty data, parse error, or unexpected error.

Originator: DEVICE | Metadata (from TO_SERVER_RPC_REQUEST):

{
"serviceId": "monolith",
"sessionId": "550e8400-e29b-41d4-a716-446655440000",
"requestId": "12345"
}

Data (built by earlier rule nodes):

{
"timestamp": 1727712000000
}
{
"serviceIdMetaDataAttribute": "serviceId",
"sessionIdMetaDataAttribute": "sessionId",
"requestIdMetaDataAttribute": "requestId"
}

Result: timestamp returned to the device as the RPC response. Routes via Success.

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "TbSendRpcReplyNodeConfiguration",
"type": "object",
"required": ["serviceIdMetaDataAttribute", "sessionIdMetaDataAttribute", "requestIdMetaDataAttribute"],
"additionalProperties": false,
"properties": {
"serviceIdMetaDataAttribute": { "type": "string" },
"sessionIdMetaDataAttribute": { "type": "string" },
"requestIdMetaDataAttribute": { "type": "string" }
}
}