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
    OrchestraStartHandler and OrchestraResumeHandler are
    removed.
  • Config schema merged to webform.handler.orchestra_interaction.
  • orchestra_webform_example: the Request form's two handlers
    collapse to one orchestra_interaction handler (workflow
    request_validation, result modified, 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

Command icon 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

mably created an issue. See original summary.

mably’s picture

Status: Active » Needs review

MR !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.

  • mably committed dd9e877e on 1.x
    task: #3608073 Unify the webform start and resume handlers into a single...
mably’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.