Terminate behavior
what is the expected behavior when you terminate a workflow?
it says it's not implemented locally, and in cloudflare steps continue to run.
couldn't find details in the docs.
5 Replies
Terminate stops an instance, it won't run any steps after it has been terminated. You might on dash see some steps "happen" but those steps did not happen after termination.
Local support should come soon.
(If this does not mirror what you are seeing please do let me know)
thanks @avenceslau, I am seeing that now, had a logic issue on my end.
additional question though, what's the best way to handle the termination within the workflow?
possible?
I don't think I understand what you mean by "termination within the workflow" 😅
😁 sorry. let's say I have a step that updates db -> calls some api -> updates db. if I terminate while its calling some api, is there a way for me to "cleanup" and update the db to a correct state after termination within the workflow itself? like a try catch of sorts? or do I need to handle this outside of the workflow?
Currently you need to handle it outside of the workflow. (But maybe some way to do that would be cool, I can see it being helpful)
I will take it up with the rest of the team
I will also add that for normal errors during a run you can absolutely try catch your steps and on error do any clean up you need to do. On termination it might get trickier.