Now we’ll define an empty Workflow schema that serves as the container for your workflow logic. This is where you’ll specify which event schema to use and how nodes connect together.Documentation Index
Fetch the complete documentation index at: https://launchpad.datalumina.com/llms.txt
Use this file to discover all available pages before exploring further.
Creating the Workflow Class
Your own workflows live in their own packages underapp/launchpad/workflows/<name>/, with schema.py, workflow.py, and a nodes/ directory. The shipped reference workflows are grouped under app/launchpad/workflows/examples/ so it’s clear they’re demos you can replace — the quickstart lives at app/launchpad/workflows/examples/quickstart/workflow.py:
Workflow Schema Components
- description: A human-readable description of what the workflow does
- event_schema: The Pydantic schema that defines the expected input data structure
- start: The name of the first node to execute in the workflow
- nodes: List of all nodes that will be part of this workflow
Registering the Workflow
To make your workflow available to the system, you need to register it in theWorkflowRegistry.
Add a new entry to app/launchpad/workflows/workflow_registry.py. The Launchpad ships with five reference workflows under workflows/examples/ already registered:
QUICKSTART) is how the rest of the system — for example, the generic /events endpoint and Celery worker — looks a workflow up. Choose a descriptive name that clearly indicates the workflow’s purpose.
Why Use a Registry?
TheWorkflowRegistry enum provides several benefits:
Centralized Management
All workflows are registered in one place, making it easy to see what workflows are available in your system.Type Safety
Using an enum ensures you can only reference workflows that actually exist, preventing typos and runtime errors.Easy Discovery
IDEs can autocomplete workflow names, making development faster and reducing errors.Dynamic Loading
The system can dynamically load and execute workflows based on the registry entry. Tip: Keep your workflow names consistent with their purpose. For example, useCUSTOMER_CARE for customer support workflows, ORDER_PROCESSING for e-commerce workflows, etc.