Thank you Allard!
Moving the injections from the constructor to @AutoWired within each method solved the problem above.
Unfortunately a new issue is event routing (not sure if it’s worth creating a new thread for this).
There are 4 methods inside the Saga.
`
@StartSaga
@SagaEventHandler(associationProperty = "syncGroupId")
fun on(event: SyncPointTriggered,
@Autowired syncPointService: SyncPointService,
@Autowired syncModelService: SyncModelService,
@Autowired syncGroupService: SyncGroupService)
`
`
@SagaEventHandler(associationProperty = "syncGroupId")
fun on(event: SyncProcessed,
@Autowired @Qualifier("eventBus") eventBus: EventBus)
`
`
@SagaEventHandler(associationProperty = "syncGroupId")
fun on(event: SyncProcessFailed,
@Autowired @Qualifier("eventBus") eventBus: EventBus,
@Autowired syncPointService: SyncPointService)
`
`
@EndSaga
@SagaEventHandler(associationProperty = "syncGroupId")
fun on(event: SyncGroupProcessed,
@Autowired syncPointService: SyncPointService,
@Autowired @Qualifier("eventBus") eventBus: EventBus)
`
In all above events there is a property of syncGroupId with the same spelling as the associationProperty.
The problem is that only the first event is processed by the Saga SyncPointTriggered. Meanwhile SyncProcessed is never processed by the event handler.
SyncProcessed is processed in a different non-saga eventhandler.
Both the Saga and the external event handler are using the same TEP.
Do you or anyone else know why this might be happening?
A bit tired but I hope to dive into the source a bit later to try and understand why this is happening.