in saga-core/src/main/java/org/apache/servicecomb/saga/core/GraphBasedSaga.java [58:80]
public GraphBasedSaga(EventStore eventStore,
Executor executor,
Map<String, SagaTask> tasks,
SagaContext sagaContext,
SingleLeafDirectedAcyclicGraph<SagaRequest> sagaTaskGraph) {
this.eventStore = eventStore;
this.tasks = tasks;
this.transactionTaskRunner = new TaskRunner(
traveller(sagaTaskGraph, new FromRootTraversalDirection<SagaRequest>()),
new TransactionTaskConsumer(
tasks,
sagaContext,
new ExecutorCompletionService<Operation>(executor)));
this.sagaContext = sagaContext;
this.compensationTaskRunner = new TaskRunner(
traveller(sagaTaskGraph, new FromLeafTraversalDirection<SagaRequest>()),
new CompensationTaskConsumer(tasks, sagaContext));
currentTaskRunner = transactionTaskRunner;
}