orchestra_interaction_webform shipped two Webform handlers: one to
start a workflow from a submission, and one to resume a parked step on submit.
They carried nearly the same settings and could drift apart (for example
capturing the submission value map on start but not on resume), and a form that
both starts a run and is later reopened to modify it needed both handlers wired
in parallel.
Proposed resolution
Replace the two handlers with a single Orchestra: start or resume on
submit handler (orchestra_interaction), keyed on the binding
element's continuation handle:
- No handle (empty or absent binding element) and a workflow
configured: the submission is a fresh start. It starts the workflow, binds the
submission to the new instance as its source entity, and seeds the variables. - Handle present (the form was reopened by the workflow): the
submission is a step. It resumes the bound instance's parked token with the
configured result and refreshes the stored submission id and value map.
Because one handler holds one set of settings, the start and resume sides can
no longer drift, and the "start then modify" loop needs only one handler. The
protected onResumed() extension point is preserved.
Changes
- New
OrchestraInteractionHandler; the old
OrchestraStartHandlerandOrchestraResumeHandlerare
removed. - Config schema merged to
webform.handler.orchestra_interaction. orchestra_webform_example: the Request form's two handlers
collapse to oneorchestra_interactionhandler (workflow
request_validation, resultmodified, seeding
request_sid,poster_uid,request).- New documentation page
docs/webform.md: a full configuration
reference for the single-handler model (binding element rules, handler settings,
scenarios, wait-node modes, chaining, gotchas, a worked example). - Kernel tests rewritten as
OrchestraInteractionHandlerTest(start,
resume, modify loop, token validation, branch scope, expiry, tampering, loop
reentry, no-op after advance); Functional tests updated.
Breaking change for consumers
This removes OrchestraStartHandler and
OrchestraResumeHandler from the module's public surface. A consumer
that subclassed either must extend OrchestraInteractionHandler
instead (the extension points are preserved). The known consumer,
yoyaku_webform, has its companion change in place.
Issue fork orchestra-3608073
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 #3
mably commentedMR !269 opened, targeting 1.x. phpcs clean; kernel (OrchestraInteractionHandlerTest, 12 tests) and functional (orchestra_interaction_webform, orchestra_webform_example) suites pass locally. The known consumer yoyaku_webform has its companion change in place.
Comment #5
mably commented