Issue #3608213: Seed webform start/resume variables before the synchronous inline drain
Fixes the webform handler seeding start/resume variables after the run has already advanced.
Under the shipped default synchronous execution mode, WorkflowEngine::start() and signal() advance the run's segment inline before they return. The handler seeded the submission id, submitter uid and value map AFTER start() returned, and wrote the value map AFTER resume() returned, so the run's first segment (and the segment after a resumed step) routed on unset or stale variables. A gateway reading values.* in the first segment took the wrong branch, silently.
Fix
- Start: pass the variables into
start()(which seeds them, and dispatchesInstanceStartedEventwith them, before the inline drain) instead of seeding after it returns.seedStart()becomesstartVariables(), a builder. - Resume: write the submission id and value map BEFORE
resume(), sosignal()'s inline advance of the next segment sees the fresh values. The result still travels inside the resume. - Removes the now-dead
store()helper (onlyseedStart()used it).
Tests
Two kernel regression tests route on the seeded / resubmitted value map in the first segment and after a resumed step. Both FAIL on the old ordering (the run routes on an unset value map and never reaches the expected branch) and PASS with the fix. Full webform kernel suite green; phpcs clean.
Found by a release-candidate audit of the changes since 1.0.0-alpha8.
Refs #3608213.