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:

Field
Definition
Example
Default

Input Element

Json path for the input in request event payload

parameters

-

Output Element

Json path for the output in response event payload

result

-

With the following event metadata parameters:

Parameter
Definition
Example
Default

Saga

ID of the saga to call

list_customers

-

Saga Path

Path of the saga to call

/ListCustomers

Input Pattern

JMESPath pattern to apply on data input

-

-

Output Pattern

JMESPath pattern to apply on data output, before returning response

-

-

circle-info

Nested sagas should only be used within the same runner as they do not replicate original event payload and metadata during execution for stateless distribution.

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.

circle-info

Unlike the other event handlers, SagaEventHandler is rarely called from within saga flows, as it acts as a coordinator rather than a simple task executor.

Last updated