|
ORE Studio 0.0.4
|
Saga executor for the provision_parties workflow. More...
#include <provision_parties_workflow.hpp>


Public Member Functions | |
| provision_parties_workflow (boost::uuids::uuid workflow_id, messaging::provision_parties_request request, std::string correlation_id) | |
| Constructs the executor. | |
| bool | execute (ores::database::context ctx, ores::nats::service::nats_client &nats) override |
| Execute all saga steps in order. | |
| void | compensate (ores::database::context ctx, ores::nats::service::nats_client &nats) override |
| Compensate completed steps in reverse order. | |
| const std::string & | failure_reason () const override |
| Human-readable reason for a failed execution. | |
| const messaging::provision_parties_response & | result () const |
| Returns the provisioning result. | |
Saga executor for the provision_parties workflow.
For each party in the request, executes three steps in order: 0. refdata.v1.parties.save — creates the party record
On failure, compensates completed steps in reverse order:
The workflow_id passed at construction is used as the parent FK when writing workflow_step records to the database.
| provision_parties_workflow | ( | boost::uuids::uuid | workflow_id, |
| messaging::provision_parties_request | request, | ||
| std::string | correlation_id | ||
| ) |
Constructs the executor.
| workflow_id | UUID of the parent workflow instance (already created by the handler before calling execute()). |
| request | Decoded inbound provisioning request. |
|
overridevirtual |
Execute all saga steps in order.
| ctx | Per-request database context for writing step records. |
| nats | Authenticated NATS client (with delegation) for calling downstream services. |
Implements workflow_executor.

|
overridevirtual |
Compensate completed steps in reverse order.
Called by the handler when execute() returns false. Must be idempotent.
| ctx | Per-request database context. |
| nats | Authenticated NATS client (with delegation). |
Implements workflow_executor.

|
overridevirtual |
Human-readable reason for a failed execution.
Valid only after execute() returns false.
Implements workflow_executor.

| const messaging::provision_parties_response & result | ( | ) | const |
Returns the provisioning result.
Valid only after execute() returns true.
