-
Notifications
You must be signed in to change notification settings - Fork 53
Make it easier to create/update action sequences. #172
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -223,12 +223,7 @@ ow.actions.create({name, action}).then(result => { | |
| const actionName = '/mynamespace/reverseWords' | ||
| const name = 'reverse' | ||
|
|
||
| ow.actions.create({ name, action: { | ||
| exec: { | ||
| kind: 'sequence', | ||
| components: [ actionName ] | ||
| } | ||
| }}) | ||
| ow.actions.create({ name, sequence: [ actionName ] }) | ||
| ``` | ||
|
|
||
| ### retrieve action resource | ||
|
|
@@ -459,6 +454,32 @@ If you pass in an array for the first parameter, the `create` call will be execu | |
| ow.actions.create([{...}, {...}]) | ||
| ``` | ||
|
|
||
| ### create & update action sequence | ||
|
|
||
| ```javascript | ||
| ow.actions.create({name: '...', sequence: ["action_name", "next_action", ...]}) | ||
| ow.actions.update({name: '...', sequence: ["action_name", "next_action", ...]}) | ||
| ``` | ||
|
|
||
| The following mandatory parameters are supported: | ||
|
|
||
| - `name` - action identifier | ||
| - `sequence` - Array containing JS strings with action identifiers to use in sequence. This can be a full or relative action identifier (e.g. `action-name` or `/namespace/package/action-name`). | ||
|
|
||
| The following optional parameters are supported: | ||
|
|
||
| - `namespace` - set custom namespace for endpoint | ||
| - `params` - object containing default parameters for the action (default: `{}`) | ||
| - `annotations` - object containing annotations for the action (default: `{}`) | ||
| - `limits` - object containing limits for the action (default: `{}`) | ||
| - `version` - set semantic version of the action. If parameter is empty when create new action openwisk generate 0.0.1 value when update an action increase the patch version. | ||
|
|
||
| If you pass in an array for the first parameter, the `create` call will be executed for each array item. The function returns a Promise which resolves with the results when all operations have finished. | ||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don’t understand this.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you pass |
||
| ```javascript | ||
| ow.actions.create([{...}, {...}]) | ||
| ``` | ||
|
|
||
| ### fire trigger | ||
|
|
||
| ```javascript | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.