Class AnnotationSagaWorkflow
java.lang.Object
org.j7m.middleware.examples.annotation.AnnotationSagaWorkflow
@SagaDefinition(name="annotation-invoice-saga")
public final class AnnotationSagaWorkflow
extends Object
Descriptor-backed saga workflow example.
The saga annotations are descriptor metadata in this Phase 6.11 slice.
Durable execution, retries, and recovery remain owned by SagaService.
The example manually executes the steps and compensation so readers can see
the intended order without claiming a new transaction coordinator.
-
Constructor Summary
ConstructorsConstructorDescriptionAnnotationSagaWorkflow(org.j7m.middleware.api.saga.SagaService sagaService, org.j7m.middleware.application.api.InvocationContext invocationContext, AnnotationExampleAudit audit) Creates a workflow with the public saga service capability. -
Method Summary
Modifier and TypeMethodDescriptionCharges an invoice.deadLetter(String invoiceId) Handles failed workflow data through a safe dead-letter summary.releaseReserve(String invoiceId) Compensates the reserve step.Reserves an invoice.runScenario(String invoiceId, boolean failCharge) Runs a deterministic local scenario that demonstrates step and compensation order.
-
Constructor Details
-
AnnotationSagaWorkflow
@Inject public AnnotationSagaWorkflow(@J7mResource("annotation-saga") org.j7m.middleware.api.saga.SagaService sagaService, @CurrentInvocation org.j7m.middleware.application.api.InvocationContext invocationContext, AnnotationExampleAudit audit) Creates a workflow with the public saga service capability.- Parameters:
sagaService- injected public saga serviceinvocationContext- current invocation contextaudit- safe audit collector
-
-
Method Details
-
reserve
-
charge
-
releaseReserve
-
deadLetter
-
runScenario
-