Orchestrate Saga
These actions provide ability to coordinate end-to-end API calls, locally executing or distributing microservice steps across the platform.
Orchestrate Saga Actions
StartSaga
Initiates execution of a new saga, using sagaPath or sagaId parameter of the requesting event, or the request metadata path if not defined. The request is accepted only if there is an active saga matching this path.
When called from within another saga, following event metadata fields are applicable for this action:
Input Element
Json path for the input in request event payload
parameters
-
Output Element
Json path for the output in response event payload
result
-
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"eventMeta": {
"type": "object",
"properties": {
"inputElement": {
"type": "string",
"definition": "Json path for the input in request event payload",
"example": "parameters",
"default": null
},
"outputElement": {
"type": "string",
"definition": "Json path for the output in response event payload",
"example": "result",
"default": null
}
}
}
}
}With the following event metadata parameters:
Saga
ID of the saga to call
list_customers
-
Saga Path
Path of the saga to call
/ListCustomers
Saga Path Path
Json path of the input payload element that specifies saga path to call
data.saga
-
Fire Forget
Whether specific call to saga should work async (in case saga itself is not configured as such)
true
false
Input Pattern
JMESPath pattern to apply on data input
-
-
Output Pattern
JMESPath pattern to apply on data output, before returning response
-
-
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"eventMeta": {
"type": "object",
"properties": {
"parameters": {
"type": "object",
"properties": {
"sagaId": {
"type": "string",
"definition": "ID of the saga to call",
"example": "list_customers",
"default": null
},
"sagaPath": {
"type": "string",
"definition": "Path of the saga to call",
"example": "/ListCustomers",
"default": null
},
"sagaPathPath": {
"type": "string",
"definition": "Json path of the input payload element that specifies saga path to call",
"example": "data.saga",
"default": null
},
"fireForget": {
"type": "string",
"definition": "Whether specific call to saga should work async (in case saga itself is not configured as such)",
"default": "false"
},
"inputPattern": {
"type": "string",
"definition": "JMESPath pattern to apply on data input",
"example": null,
"default": null
},
"outputPattern": {
"type": "string",
"definition": "JMESPath pattern to apply on data output, before returning response",
"example": null,
"default": null
}
}
}
}
}
}
}StepSaga
Executes the next action after a saga step is completed by an event runner, using the saga id and step id in event saga metadata.
Last updated
