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

Doc: Howto use "stillprocessing" #144

Open
PhMemmel opened this issue Mar 22, 2022 · 0 comments
Open

Doc: Howto use "stillprocessing" #144

PhMemmel opened this issue Mar 22, 2022 · 0 comments

Comments

@PhMemmel
Copy link
Contributor

Sorry to open an issue for that, but it's a documentation issue for me :-)

I'm wondering what "stillprocessing: the step still wants to process the course and is responsible for rendering the site." actually means or better: how to use this.

My use case would be: I want a user to do an interactive action. But I don't want the action to immediately take place when the user hits the button, but I want the user to get redirected to another site (which servers additional explanations what he has to do etc.) On this page he/she finally hits a button which should trigger the real action I want the plugin step to execute.

Currently I have an action defined in handle_interaction in my step subplugin. If the user hits the button he sends this action and I just call a redirect to my custom site from the handle_interaction method which means I exit the handle_interaction method before I can return anything (especially I cannot return step_interactive_response::still_processing(). After the user has confirmed the action I manually call process_proceed or - if the action fails - process_rollback to "finalize" this step which I feel is not the right way to do, or is it? How do I use the step_interactive_response::still_processing() then?

Can you give me an example on how I use step_interactive_response::still_processing() return value of handle_interaction to be able to deal with the use case of having my own site triggering the real action? Or is this a complete different type of use case this option is trying to address?

Thank you very much in advance!

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