Backend Executor Overview
Every node type in Flow Studio has a corresponding backend executor — a C# class that runs when the workflow engine reaches that node. Executors implement IProcessElementExecution and are discovered at startup via the ExecutorRegistry.
What an Executor Does
The process engine calls the executor's ExecuteAsync method with a NodeExecutionContext containing everything the executor needs: the node's configuration, upstream output data, tenant identity, and a cancellation token. The executor performs its work and returns a NodeExecutionResult indicating which output port to follow next.
Where Executors Live
| Category | Project Path |
|---|---|
| Core (built-in logic) | ExecutionNodes/Core/BizFirst.Ai.ExecutionNodes.Core/ |
| Standard integrations | ExecutionNodes/Standard/*/ |
| Social integrations | ExecutionNodes/Social/*/ |
| Enterprise integrations | ExecutionNodes/Enterprise/*/ |
| AI execution nodes | ExecutionNodes/Ai/*/ |
| Custom (your node) | ExecutionNodes/Custom/*/ (new project per node family) |
Executor Pipeline Stages
BaseNodeExecutor runs every executor through a multi-stage pipeline before calling your ExecuteInternalAsync:
- Entry — load node definition and context
- EntryValidate — parse and validate configuration
- PreGuardRails — run pre-execution guard rails (rate limit, quota)
- PreProcess — HIL check; suspension if waiting for approval
- Process — calls
ExecuteInternalAsync(your code) - PostProcess — post-execution hooks
- PostGuardRails — content policy, output validation
- Exit — emit SignalR event, persist result
- Error — called if any stage throws
You only implement stage 5. The base class handles all others.
Three-File Structure
Each executor typically splits across three files following the single-responsibility principle:
| File | Contents |
|---|---|
MyNodeExecutor.cs | Class declaration, NodeTypeName const, constructor, ExecuteInternalAsync routing |
MyNodeExecutor.Config.cs | CreateExecutorSettings() override, settings property accessor |
MyNodeSettings.cs | Settings class extending BaseNodeExecutorSettings |
Key Source Locations
| Component | File |
|---|---|
IProcessElementExecution | ProcessEngine/Domain/Node/Interfaces/IProcessElementExecution.cs |
BaseNodeExecutor | ProcessEngine/Service/Services/Executor/Service/Base/Executor/BaseNodeExecutor.cs |
NodeExecutionContext | ProcessEngine/Domain/Execution/NodeExecutionContext.cs |
NodeExecutionResult | ProcessEngine/Domain/Execution/Context/ExecutionResult/NodeExecutionResult.cs |
BaseNodeExecutorSettings | ProcessEngine/Domain/Node/Configuration/Settings/Base/BaseNodeExecutorSettings.cs |
| Registration example | ExecutionNodes/Core/Dependency/CoreExecutorDependency.cs |