Skip to content

GCP.Workflows reference

Source: src/GCP/Workflows/CreateExecution.ts

Runtime binding for Workflows executions.create.

Starts a new execution of the latest revision of a Workflow. Bind this operation in a Function/Action init phase. Provide CreateExecutionHttp.

const createExecution = yield* GCP.Workflows.CreateExecution(greet);
const execution = yield* createExecution({
body: { argument: JSON.stringify({ name: "world" }) },
});

Source: src/GCP/Workflows/CreateExecutionHttp.ts Kind: Layer · Provides: GCP.Workflows.CreateExecution

HTTP implementation of CreateExecution.

Source: src/GCP/Workflows/Workflow.ts

A Google Cloud Workflows workflow — YAML or JSON orchestration that Workflows executes as a revisioned program.

Changing workflowId or location replaces the workflow. Updating source, service account, or environment variables creates a new revision; already-running executions keep the old revision.

Generated name

const greet = yield* GCP.Workflows.Workflow("Greet", {
sourceContents: `main:
steps:
- done:
return: hello
`,
});

Named workflow with labels and env vars

const greet = yield* GCP.Workflows.Workflow("Greet", {
workflowId: "order-greet",
location: "us-central1",
description: "say hello",
labels: { env: "prod" },
callLogLevel: "LOG_ERRORS_ONLY",
userEnvVars: { greeting: "hello" },
sourceContents: `main:
steps:
- done:
return: hello
`,
});
const createExecution = yield* GCP.Workflows.CreateExecution(greet);
const execution = yield* createExecution({
body: { argument: JSON.stringify({ name: "world" }) },
});