Problem/Motivation
The variable resolver ("Amount from process variables") read fixed variable names (payment_amount, payment_currency, payment_gateway). A workflow that already carries an amount under its own variable name (order_total, say) had to copy it into payment_amount first. More generally, payable resolvers could not carry any settings.
Proposed resolution
Make PayableResolver plugins configurable (ConfigurableInterface plus PluginFormInterface via the shared ConfigurablePluginTrait), and have the payment step render the chosen resolver's own settings subform, swapping it live when the resolver select changes (reusing orchestra's InnerPluginSettingsTrait, the same machinery the node interaction editor uses). A resolver with no settings renders nothing.
The variable resolver gains three fields naming the amount, currency and gateway variables it reads, defaulting to payment_amount, payment_currency and payment_gateway.
Covered by a kernel test (the resolver honors configured variable names) and a FunctionalJavascript test (the live subform swap reveals the fields and switching back removes them with no orphaned-field validation error). Orchestra is pre-1.0 with no released users, so no upgrade path is needed.
Remaining tasks
- Review.
Issue fork orchestra-3609123
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
Comment #3
mably commentedOpened MR !301 (rebased on 1.x after #3609120 merged). Kernel + FunctionalJavascript coverage. Setting to Needs review.
Comment #5
mably commented