Retrieving Saga Scheduled Events?


Is there any way we can store saga scheduled events in the aggregate?
How can we retrieve the scheduled events from saga?

Prashant Tiwari

Hi Prashant,

when scheduling an event, you get a scheduling token. You can use that to cancel the event, for example. It (currently) doesn’t allow you to get the instance of the scheduled event.
Typically, you’d want to store the schedule token in your saga (don’t see why you’d want to store it in the aggregate, maybe I misunderstood?), so that future activity can cancel the schdule.



Hi Allard,

I want to query the current status of the saga.
I am able to load the saga but how can i access the scheduled token outside of a saga?


Hi Allard,

I can access the scheduled token outside the saga but it will not serve my purpose as i am making it null as soon as the event is fired.
How can i know which scheduled event was fired so that i can check the current state of saga?
Its quite similar to reading events from the eventstore. (Getting a trace of scheduled events fired)


Query for what purpose? Monitoring? If it’s for showing data on screen, you should really use a query model for that.
If it’s for monitoring, you can simply put a getter on the saga.

You could consider storing that information in the saga itself. Axon doesn’t keep track of history of the Sagas, yet.

Thanks Allard, for now we are storing the information in the saga itself.