GCP.Workflows reference
CreateExecution
Section titled “CreateExecution”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.
CreateExecution: Starting Executions
Section titled “CreateExecution: Starting Executions”const createExecution = yield* GCP.Workflows.CreateExecution(greet);const execution = yield* createExecution({ body: { argument: JSON.stringify({ name: "world" }) },});CreateExecutionHttp
Section titled “CreateExecutionHttp”Source:
src/GCP/Workflows/CreateExecutionHttp.tsKind: Layer · Provides:GCP.Workflows.CreateExecution
HTTP implementation of CreateExecution.
Workflow
Section titled “Workflow”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.
Workflow: Creating a Workflow
Section titled “Workflow: Creating a Workflow”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`,});Workflow: Executing a Workflow
Section titled “Workflow: Executing a Workflow”const createExecution = yield* GCP.Workflows.CreateExecution(greet);const execution = yield* createExecution({ body: { argument: JSON.stringify({ name: "world" }) },});