Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants