csantanapr commented on a change in pull request #3202: Support action
continuations in the controller
URL:
https://github.com/apache/incubator-openwhisk/pull/3202#discussion_r163045464
##########
File path: docs/compositions.md
##########
@@ -0,0 +1,144 @@
+# Action compositions
+
+Action compositions make it possible to dynamically build and invoke a series
of actions. Action compositions are similar to sequences. However, whereas the
components of a sequence must be specified before invoking the sequence,
components of a composition can be decided as the composition is running.
+
+## Example
+
+Suppose we define an _increment_ action:
+
+```
+$ cat > increment.js
+function main({ value }) { return { value: value + 1 } }
+^D
Review comment:
separate command from code, make code in it's own block with the language
annotation to highlight and easy to copy paste out.
Also I think removing the `cat` command is better, I'm not sure if there is
a `cat` in windows.
Example:
Suppose we define an _increment_ action: in a source file `increment.js`
```javascript
function main({ value }) { return { value: value + 1 } }
```
Create the action _increment_:
```
wsk action create increment increment.js
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services