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 2018/08/23 11:53:48 UTC

[GitHub] van-ibm commented on issue #966: Referencing code from a dependent package leads to error

van-ibm commented on issue #966: Referencing code from a dependent package leads to error
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/issues/966#issuecomment-415388106
 
 
   The use case is that I want to reference the file Packages/jsonetl-master/dist/Request.js.  By creating a mock Request.js you prevent the issue. Had you attempted the manifest as written without further modification, I expect the error would have occurred.
   
   The purpose of the use case is to re-use the Packages/jsonetl-master/dist/Request.js and assign inputs to the action. Here's an example of doing so:
   ```
   request-accounts:
           function: Packages/jsonetl-master/dist/Request.js
           runtime: nodejs:8
           inputs:
             _url: https://accountmanagement.bluemix.net/coe/v2/getaccounts
             _bearer: ${UAA_TOKEN}
   ```
   The `request-accounts` action will always use the statically defined `_url`. You might then say, "Why not just supply `_url` as an input parameter upon invocation?" The answer is because once the action is part of a sequence, that input parameter is lost unless upstream actions continue to forward it. So this gives me a way to bake in parameters for actions that exist within sequences. If there is a better way to achieve this, I'm open to alternate approaches.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services