sequential-workflow-machine icon indicating copy to clipboard operation
sequential-workflow-machine copied to clipboard

Async Workflows

Open atymic opened this issue 2 years ago • 1 comments

Hey! Does this support workflows that are async, for example a chatbot. Where the workflow state can be persisted, then resumed?

atymic avatar Oct 19 '23 04:10 atymic

Hello @atymic!

Now the engine doesn't support it. But you may achieve it in hacky way. Your activity should throw a well known error. This will stop the workflow machine. Then you can dump the state to your storage. To resume the workflow you need to pass the initialStepId parameter to WorkflowMachineBuilder and reuse the previous state.

b4rtaz avatar Oct 19 '23 10:10 b4rtaz

I think 0.7.1 provides some solution for this problem.

b4rtaz avatar Aug 19 '24 12:08 b4rtaz