Create Workflow

createWorkflow Mutation

Creates a new Workflow definition in the system.

Arguments

Name
Type
Description

input

CreateWorkflowInput!

Input data for creating the workflow

Return Type

Workflow - The created workflow definition.

Input Fields

CreateWorkflowInput:

Field
Type
Description

dataTypeID

UUID

Optional data type ID to associate with the workflow

dataTypeSlug

String

Optional data type slug

data

Map

Custom data associated with the workflow

name

String

Name of the workflow

active

Boolean

Whether the workflow is active and can be triggered

filterRule

String

Filter rule to determine when this workflow should be triggered

workflowsignalIDs

[ID!]

IDs of workflow signals to associate with this workflow

Usage Example

JavaScript Example

Important Notes

  • Workflows define reusable business logic that can be triggered by events

  • The filterRule determines when the workflow should be activated based on data conditions

  • Inactive workflows (active: false) will not be triggered even if conditions are met

  • The data field supports flexible JSON structures for workflow configuration

  • Workflow signals define the entry points and event handlers for the workflow

  • Once created, workflows can be managed through the Temporal workflow engine

Last updated

Was this helpful?