Problem
In the Webform interaction flow, when a visitor goes back from a later step to the form step (a loop, for example a payment step routing a "back" outcome to the form), resubmitting the reopened form leaves the run stuck on the form node: the dispatcher keeps redirecting to the form and the step never advances.
Separately, the back and cancel actions show a generic "Are you sure? This action cannot be undone." confirmation page, which is the wrong experience for plain navigation.
Steps to reproduce
- Build a workflow with a webform wait step that loops: the form step goes to a later wait step, and the later step routes a "back" outcome to the form step.
- Submit the form, reach the later step, then go back.
- The reopened form is shown; submit it again.
Result: the run sits on the form step instead of advancing. The back and cancel links also show a confirmation page first.
Root cause
- The resume handler resumed the token id named by the submission, but a loop re-enters the node with a fresh token, so that id is already consumed.
- The orchestra_interaction element relied on a plugin default property for prepopulation. Webform tracks prepopulation from the stored #prepopulate property, not the plugin default, so the element never captured the capability token from the dispatcher link.
- The back and cancel outcomes were resumed through a confirmation form, even though the signed capability token in the link is already the gate.
Proposed resolution
- Resume by node: add InteractionResolver::parkedTokenAtNode() and have OrchestraResumeHandler resume the token parked on that node now, so a re-submit after going back advances instead of looping on the form.
- Force prepopulation on the orchestra_interaction element in initialize(), so it is genuinely zero-config and always captures the token.
- Resume visitor outcomes in one click: InteractionController::signal() verifies the token, checks the outcome is one the parked step allows, and resumes immediately. Remove the confirmation form.
Adds a functional test driving the full dispatcher to webform to resume to back to resubmit path over HTTP, plus kernel coverage of the loop re-entry and the one-click signal action.
Issue fork orchestra-3606607
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mably commentedFix pushed as a merge request against 1.x: https://git.drupalcode.org/project/orchestra/-/merge_requests/226
Three root causes are addressed: resume the token parked on the node now rather than the consumed token id (loop re-entry), force prepopulation on the orchestra_interaction element so it captures the capability token, and resume the back and cancel outcomes in one click gated by the signed token (the confirmation form is removed). Adds a functional test over HTTP plus kernel coverage; all green locally.
Comment #4
mably commentedCorrection: the merge request is now from the issue fork, https://git.drupalcode.org/project/orchestra/-/merge_requests/227 (target 1.x). The earlier !226 was closed because it was pushed from the wrong source branch.
Comment #6
mably commented