composer
composer copied to clipboard
combinator/idiom for injecting parameters to invoke an action
composer.retain(
composer.value(slackConfig)),
({result, params}) => Object.assign(result, params),
`/whisk.system/slack/post`)
or
composer.retain(
composer.value(watsonTranslateConfig)),
({result, params}) => Object.assign(result, params),
`/whisk.system/watson/languageId`)
to avoid creating bindings, or to override parameters/pass secrets to an app.
the optional properties allowed for a task are merge
, input
and output
, none of these allow one to easily bind parameters to be passed to the task that's called; could build a new combinator for that, or possibly enhance/modify task so that an additional params
field is allowed.
this is to make it easier to pass parameters specific to an action without doing the retain/value/smash described above.
I added example combinators to TEMPLATES.md along these lines.