Follow-up cleanup of the context_display feature (#3608397, #3608435), driven by a layering smell: the context-message handling had crept across submodules.

Relocate and clean up ContextMessages

  • The service depends only on the engine, the messenger and the token service (no webform coupling), so it moves from orchestra_interaction_webform to the base orchestra_interaction module, where any submodule can reuse it. Its docblocks no longer name a specific consumer.
  • A step rendered in place (a review inside a task, a dispatcher status page) now renders its context inline through a new build() method (a status_messages render array), as part of the interaction output. It appears with the step and is gone when the run advances, so there is nothing to retract and no other module is involved.
  • display()/retract() (the messenger path) remain for the one case a render array cannot reach: a step that redirects the actor to a separate surface. The consumer that posts there (the webform handler) is the one that retracts, on completion.
  • This removes the cross-submodule reference the task form had grown (it no longer touches context messages at all).

Instance view: variable scope

  • The Variables table on the process instance page gains a Scope column: "Instance" for instance-wide variables, or the node and token id ("n_validate (#1836)") for a token-scoped one, so two rows of the same name written on the same node in different loop rounds are told apart.

Examples

  • The validate step now shows the previous validation comment on a re-review (empty, so hidden, on the first pass).
  • The gratuitous "Reviewed by {name}" line on the process step is dropped (the label-token feature it demonstrated stays in code and tests).

Tests: ContextMessagesTest moves to the base module and covers build() (render array) alongside the messenger display()/retract(); the request-validation Functional test covers the re-review comment and the inline render; no orchestra_ui test regressed.

Issue fork orchestra-3608462

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 !287 implements it.

  • ContextMessages moved to the base orchestra_interaction module (no webform coupling); in-place steps render context inline via build() so nothing is retracted and no other module is involved; the messenger display()/retract() pair stays only for the redirect path, owned by the webform handler.
  • The task form no longer references context messages at all.
  • The instance-view Variables table gained a Scope column (Instance, or node and token id), disambiguating token-scoped rows.
  • Examples: validate step shows the previous validation comment on re-review; the "Reviewed by" line on the process step is dropped.

Verified: 17 kernel files and both Functional suites in Docker, phpcs, cspell, and on a live site.

  • mably committed 3fc2e18d on 1.x
    task: #3608462 Relocate ContextMessages to the base module, render in-...
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.