ProcessDto
The single argument every node's processAction() receives. It carries the message payload, the request/response headers used by the platform, and the routing/result decision the node makes.
import ProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/ProcessDto';
Methods provided #
| Method | Returns | Purpose |
|---|---|---|
getJsonData() | unknown | Parse and return the message payload. |
setJsonData(value) | this | Replace the payload with serialized JSON. |
getData() | string | Raw body. |
setData(value) | this | Set raw body (use for non-JSON payloads). |
getHeaders() | Record<string, string> | Inbound message headers. |
setHeaders(headers) | this | Replace the header map. |
addHeader(key, value) | this | Add or overwrite one header. |
setStopProcess(code, reason) | this | End this branch. See ResultCode. |
Headers of interest #
| Header (constant) | Meaning |
|---|---|
process-id | The correlation id of the running process. |
node-id | The current node id. |
topology-id, topology-name | Topology identification. |
application | The Application this connector/node is registered against. |
user | The user identifier the message is processed for. |
You will rarely set these by hand; the platform fills them in for you.
See also #
- BatchProcessDto
- ResultCode
- PHP equivalent:
ProcessDto