A comment or review task stores its outcome as a {result, comment} map when the completer leaves a note (OutcomeResult writes the whole result payload to the result variable). A flow condition that compares the bare variable to a scalar, e.g. validation == approved, then compares the whole map to a string and never matches, so an approve/reject branch dead-ends: the token is consumed with no outgoing flow and the run ends without confirming or rejecting.

The dotted path already handles this: resolve() makes validation.result work whether the completion stored a scalar or a map. This adds the symmetric case so the bare variable works too, which is what workflow authors naturally write.

Fix

In the Comparison flow condition, when the resolved value is a {result, comment} map, route on its result element before comparing. So validation and validation.result behave the same, with or without a note. No change to OutcomeResult (the array result stays, as designed).

Test

Adds a ComparisonTest case: the bare variable matches the map's result for both == and !=, with a note (a map) and without one (a scalar). Existing comparison and conditional-flow tests still pass.

Issue fork orchestra-3610513

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

  • mably committed ab761ae4 on 1.x
    fix: #3610513 Comparison condition: route an approve/reject branch on a...
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.