You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2019/12/02 23:36:44 UTC

[GitHub] [openwhisk-wskdeploy] tardieu edited a comment on issue #805: Add support for Composer

tardieu edited a comment on issue #805: Add support for Composer
URL: https://github.com/apache/openwhisk-wskdeploy/issues/805#issuecomment-560891670
 
 
   The action name may specify the namespace and/or package containing the action following the usual OpenWhisk grammar. If no namespace is specified, the default namespace is assumed. If no package is specified, the default package is assumed.
   
   https://github.com/apache/openwhisk-composer/blob/master/docs/COMBINATORS.md#action
   
   It is possible however to invoke an action from the same package without specifying the package name in advance by replacing `composer.action` with something like `invokeRelative`:
   ```javascript
   const composer = require('openwhisk-composer')
   
   function invokeRelative (name) {
     return composer.let({ name }, () => { name = process.env.__OW_ACTION_NAME.split('/').slice(0, -1).concat(name).join('/') },
       params => ({ type: 'action', name, params }),
       composer.dynamic())
   }
   
   module.exports = invokeRelative('action-name')
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services