Summary
Add a Workflow Execution Service that provides a programmatic API for executing FlowDrop workflows. This service is used internally by the Workflow Executor node but is also available for custom module development.
Business Value
- Enables custom modules to trigger workflows programmatically
- Provides a clean API for workflow orchestration
- Supports integration with external systems that need to invoke workflows
- Centralizes workflow execution logic for consistency
Service Methods
execute(): Execute a workflow with specified mode and input datagetResults(): Get results for an existing session with optional waitisComplete(): Check if a workflow session has completedgetStatus(): Get the current status of a workflow session
Execution Modes
MODE_JOB: Create session, trigger execution, wait for completionMODE_JOB_ASYNC: Create session, trigger execution, return immediatelyMODE_JOB_FIRE_FORGET: Queue for later execution (truly async)
Safety Features
- Maximum execution depth of 5 levels to prevent infinite recursion
- Circular workflow reference detection using workflow chain tracking
- Parent context propagation for debugging and audit trails
Service ID
flowdrop_workflow_executor.service
Comments
Comment #2
gxleano commentedI have contributed (not only by code, but discussion, presentation, testing or anything related).
Comment #3
d34dman commented