| 19 | const client: ExecutionsClient = new ExecutionsClient(); |
| 20 | |
| 21 | async function createExecution( |
| 22 | projectId: string, |
| 23 | location: string, |
| 24 | name: string |
| 25 | ) { |
| 26 | /** |
| 27 | * TODO(developer): Uncomment these variables before running the sample. |
| 28 | */ |
| 29 | // const projectId = 'my-project'; |
| 30 | // const location = 'us-central1'; |
| 31 | // const name = 'my-test-workflow'; |
| 32 | |
| 33 | const [resp] = await client.createExecution({ |
| 34 | parent: client.workflowPath(projectId, location, name), |
| 35 | }); |
| 36 | console.info(`name: ${resp.name}`); |
| 37 | } |
| 38 | |
| 39 | createExecution(projectId, location, name).catch((err: Error) => { |
| 40 | console.error(err.message); |