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

Ability to cancel current wizard workflow without restarting #158

Open
ronflima opened this issue Nov 20, 2019 · 0 comments
Open

Ability to cancel current wizard workflow without restarting #158

ronflima opened this issue Nov 20, 2019 · 0 comments

Comments

@ronflima
Copy link

Scenario

  1. User enter a wizard's workflow
  2. At the middle of the wizard's workflow, the user abandon it by clicking a "cancel" button, since it has no interest in continuing.
  3. Later the user come back and enter the wizard's workflow, on the same session.

Current behavior

  • The user will be directed to the point where it stopped last.

Desired behavior

  • The user should start at the workflow's beginning since it has canceled the last one.

Workarounds

It is possible to implement this behavior by subclassing SessionWizardView and overloading the post handler. On the template, add an extra "cancel" button with a known value (something like "cancel-workflow"). On the overloaded post handler, evaluate the POST data by checking if value "wizard_goto_step" has the known cancel value on it (i.e. "cancel-workflow"). If not, call the superclass implementation. Otherwise, reset the storage and redirect to a pre-defined web page.

Reasons

Although the workaround implementation is quite simple, this is an interesting behavior that should be added to the code base in order to consider such cancellation scenarios.

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

No branches or pull requests

1 participant