The Orchestra message interaction (from orchestra_interaction) resolves tokens with only the process instance and branch in the data, so a booking's [yoyaku-order:*] tokens clear: the order token handler finds no order to render.

A booking workflow often needs to show order details in a parked-step message, most obviously the grouped order summary [yoyaku-order:bookings] on the confirmation step, the same summary already shown on the cart, the order pages and the payment landing.

Proposed: a hook_tokens bridge in yoyaku_orchestra_order, the module that already knows both an Orchestra instance and a booking order (as OrderNotifier does when it attaches the order to a notification's token data). When the order is not already in the token data but an Orchestra instance is, the bridge resolves the instance's correlated order through the booking correlator and re-dispatches the order tokens with the order in the data, so [yoyaku-order:*] resolve in an Orchestra message exactly as they do in a notification. The base order tokens stay unaware of Orchestra, and Orchestra stays unaware of orders.

Then add [yoyaku-order:bookings] to the example workflow booking confirmation message.

Follow-up to #3613003.

Issue fork yoyaku-3613055

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 committed 7412d8e7 on 1.x
    feat: #3613055 Make order tokens resolve in Orchestra workflow messages...
mably’s picture

Status: Active » 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.