Split the overloaded result vocabulary into the outcome and the completion payload

Splits the overloaded result vocabulary into the two concepts the code already keeps apart: the outcome (the resolved decision an outgoing flow condition routes on) and the completion payload (whatever complete() was called with, a scalar or an array carrying the outcome alongside a task type's extra data).

Renames, by concept

  • OutcomeResult::OUTCOME_KEY value result becomes outcome, and the class becomes Completion (it is a resolved completion: outcome + variables + scope). FlowConditionBase spelled the key as a literal in its dotted-path rule; it now reads the constant.
  • result_variable becomes payload_variable: it holds the whole payload, which is why a flow condition has to unwrap a member out of it.
  • result_scope becomes completion_scope: it scopes every completion variable, the completer included.
  • timeout_result / default_timeout_result do name an outcome, so timeout_outcome / default_timeout_outcome.
  • ResultVariablesInterface::resultVariables() becomes CompletionVariablesInterface::completionVariables(), with every implementer in the same commit; ResultVariableConfigTrait becomes CompletionConfigTrait (payloadVariableElement(), completionScopeElement()).
  • Engine API: resumeWithResult() becomes resumeWithPayload(), recordResult() becomes recordPayload(), ResumeTokenEvent::$result becomes $payload.
  • Subprocess contract, the third sense of the word (a child's output, a variable map rather than a payload): collectResult(), resultForTerminalChild() and resultScope() become collectVariables(), variablesForTerminalChild() and completionScope().
  • ECA: the resume action's config key result becomes outcome; the task's result_token becomes outcome_token, and the ECA token names orchestra_result / orchestra_result_variable become orchestra_outcome / orchestra_payload_variable.
  • Webform: the interaction handler's config key result becomes outcome (Resume outcome in the UI).
  • The join merge's scope label was also "Result scope"; it is now "Merge scope", since it scopes the merged list, not a completion.

Not a plain find and replace

Roughly half the occurrences of the word meant payload and the other half meant outcome, and a third group (query results, access results, views result rows) means neither, so every site was read. Config schema labels, the shipped example workflows including the BPMN XML they embed, the docs and the French translations move with the code; the fr.po msgids follow the changed source strings, with issue for outcome and complétion for the payload/scope family.

Data and config that has to be rewritten by hand

Pre-release, so no update hooks:
  • process variables holding a payload written under the old result key,
  • saved workflows whose node config carries the old keys (and the BPMN XML alongside),
  • orchestra.settings default_timeout_result,
  • act links already sent carry the old result query parameter and stop naming an outcome.

Downstream

yoyaku consumes the config keys (its example workflow and two kernel tests), so it needs its own MR in the yoyaku queue; that is being prepared alongside this one.

Merge request reports

Loading