Task-based workflow

I read an article called “Status-driven and Task-based Asynchronous Workflow in Microservices”
https://www.aaronzhuo.com/status-driven-and-task-based-asynchronous-workflow-in-microservices/

I am looking if I could use Sagas in Axon to be used as Tasks. Any general feedback about this approach is very welcome.
I am trying to create a Saga and task ID and return the task ID from a REST controller.
The examples I saw all start a Saga based on an event. I tried to use a @StartSaga and @CommandHandler for my saga command in my Saga class, but that doesn’t seem to work.

Is there some way to manually create a saga or do this is a different way?

Hi Robert,

Sagas are meant for coordinating activities in different components. It may very well be that one of these components is a “Task” component that emits a “TaskCreated” that then triggers the Saga to undertake certain actions and perhaps even update the Task along the way.
In this case, the Saga itself is not the Task, but a component that coordinates/executes certain aspects of it.

You can’t trigger Sagas in Axon using Commands. They only respond to Events.

Hope this helps.
Cheers,