I have a Saga component which contains a method which is annotated with
@StartSaga and which expects
EventA as first parameter.
My “problem” is that the I don’t ant to start a Saga for every occurence of
EventA. In fact I want to check some properties in
EventA and then decide if I want to start a sage or not.
While it’s possible to end a saga conditionally using
SagaLifecycle.end() it seems not to be possible to start a saga conditionally. The only workaround I can think of is calling
SagaLifecycle.end() in the
@StartSaga annotated method in order to end the saga immediately, but that feels a hack.