I have two actions (each one does a different REST call to a service to collect some data), and I want to create a meta-Action which essentially triggers the two actions and aggregates the results.
I am just getting started with OpenWhisk, And I pretty much know how I would do this in the given language I am using to implement actions, but I am curious what the appropriate OpenWhisk way to do this might be?
If you want to aggregate the results, there is no other way currently than the one described by you:
Create a new action, fire the two actions (blocking=true) and merge the results.
The
openwhisk
module on npm makes that extra-simple, as you can invoke an array of actions there:Invoking the actions
blocking
ly, makes their results available in the response vs. not usingblocking
where you'll only get an activation id to get the results in an asynchronous fashion.