Avatar

Employee

Rule and Trigger is the cleanest way but you can also do this if needed

const openwhisk = require('openwhisk')

const options = {
          apihost: 'HOST:PORT', 
          api_key: 'API_KEY_HERE',
          api: process.env['__OW_API_HOST'] + "/api/v1/"
        }
let wsk = openwhisk(options)

let invokeParams = {"stuff":"my stuff","topass":"in","asparams":"more data"}

 wsk.actions.invoke({
              actionName:"/my/namespace/actionname",
              blocking: false,
              result: false,
              params:invokeParams
            });