Skip to content
This repository has been archived by the owner on Jan 17, 2025. It is now read-only.

combinator/idiom for injecting parameters to invoke an action #6

Open
rabbah opened this issue Oct 8, 2017 · 2 comments
Open

combinator/idiom for injecting parameters to invoke an action #6

rabbah opened this issue Oct 8, 2017 · 2 comments

Comments

@rabbah
Copy link
Contributor

rabbah commented Oct 8, 2017

  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.

@rabbah
Copy link
Contributor Author

rabbah commented Oct 16, 2017

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.

@tardieu
Copy link
Member

tardieu commented May 23, 2018

I added example combinators to TEMPLATES.md along these lines.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants