GenericSagaFactory sagaFactory = new GenericSagaFactory();
// this will allow the eventScheduler and commandGateway to be injected in our Saga
sagaFactory.setResourceInjector(new SimpleResourceInjector(eventScheduler, commandGateway));
// Sagas instances are managed and tracked by a SagaManager.
AnnotatedSagaManager sagaManager = new AnnotatedSagaManager(sagaRepository, sagaFactory,
eventBus, ToDoSaga.class);
// and we need to subscribe the Saga Manager to the Event Bus
sagaManager.subscribe();
// That's the infrastructure we need...
// Let's pretend a few things are happening
// We create 2 items