小编McK*_*urt的帖子

在 Nodejs 中执行 Google Cloud 工作流程时如何包含运行时参数?

我试图在执行谷歌云工作流程时包含运行时变量。除非您使用 REST API,否则我找不到执行此操作的文档。

这是我的代码,主要来自他们的文档,我只是得到了 null 参数。我认为这可能是它在 createExecution 上期望的第二个参数,名为执行,但我无法弄清楚。

const { ExecutionsClient } = require('@google-cloud/workflows');

const client = new ExecutionsClient();

const execute = () => {
  return client.createExecution(
    {
      parent: client.workflowPath('project_id', 'location', 'name'),
    },
    {
      argument: {
        users: ['info here'],
      },
    },
  );
};

module.exports = execute;
Run Code Online (Sandbox Code Playgroud)

谢谢您的帮助!

google-workflows

2
推荐指数
1
解决办法
1200
查看次数

标签 统计

google-workflows ×1