Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Cancel Workflow without throw/return Error #403

Open
MysticDoll opened this issue Jan 6, 2025 · 3 comments
Open

[FEATURE] Cancel Workflow without throw/return Error #403

MysticDoll opened this issue Jan 6, 2025 · 3 comments
Labels
feature request New feature or request

Comments

@MysticDoll
Copy link

Description of the problem being solved
If some condition to abort Workflow appeared in custom step, now we can only to abort the workflow is return or throw Error in handler.

I wanna abort workflow without throw or return an Error, like when the user click cancel the form from open_form function.

Alternative solutions

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

@WilliamBergamin
Copy link
Contributor

Hi @MysticDoll thanks for writing in!

Currently you can leave the workflow in a Processing state by having a function return { completed: false }, leaving the workflow in this state should be harmless.

let me know if this resolves your issue

@WilliamBergamin WilliamBergamin added the feature request New feature or request label Jan 6, 2025
@MysticDoll
Copy link
Author

@WilliamBergamin

Currently you can leave the workflow in a Processing state by having a function return { completed: false }

I've already know it but I didn't know if this Processing state was potentially something wrong.

leaving the workflow in this state should be harmless.

If it should be harmless, I leave workflows with {completed: false}.

However, I think there should be something different way to cancel workflow.

I think it cause me confused. Because sometime {completed: false} is used with addBlockActionsHandler, I think waiting for an action and canceling a workflow should be distinguishable in our code.

@mroy-seedbox
Copy link

I definitely wouldn't be against a way to officially end/cancel workflows, rather than leaving them hanging in a Processing state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants