Node types
Every workflow is built from nodes. Each node has a
type that determines how Flowker processes it at runtime.
trigger
The entry point of a workflow. Every workflow must begin with a trigger node. When a workflow execution starts, the engine enters through this node and begins routing from it.executor
Calls an external executor — an HTTP service, API, or provider registered in Flowker. This is the primary building block for integrating with fraud engines, payment providers, notification services, and other external systems.conditional
Evaluates an expression against the execution context and routes to different branches based on the result. Conditional nodes enable branching logic — for example, routing to an approval path when a risk score is high, or continuing directly when it is low.action
A generic action node for steps that do not involve external calls but represent meaningful operations within the workflow — such as transforming data, emitting an event, or recording a state change.Edges
Edges connect nodes and define the execution path. Each edge has the following fields:
| Field | Description |
|---|---|
id | Unique identifier for the edge |
source | ID of the origin node |
target | ID of the destination node |
sourceHandle | Which handle (output port) of the source node this edge originates from |
condition | An expression that must evaluate to true for this edge to be followed |
label | Human-readable label for the edge (used in visualization and debugging) |
Example edge
condition field accepts expressions evaluated against the execution context. When omitted, the edge is always followed if the source node completes successfully.
Status transitions
Workflows move through a well-defined lifecycle. Understanding status transitions is critical for safely deploying and iterating on workflows.
- draft — The initial state. All modifications (adding nodes, editing edges, changing configuration) are only allowed in
draftstatus. - active — A workflow that has been activated. It can be executed. No modifications are permitted while active.
- inactive — A workflow that has been deactivated. It can no longer be executed.
Rules
- Only a
draftworkflow can be activated (transition:draft → active). - Only an
activeworkflow can be deactivated (transition:active → inactive). - Attempting an invalid transition returns error
FLK-0102. - Attempting to modify a workflow that is not in
draftreturns errorFLK-0103.
Iterating safely with clone
To modify an active workflow, clone it first. Cloning creates a newdraft from any status, copying all nodes and edges. You can then edit the draft, test it, and activate it when ready — without affecting the currently running version.
This is the recommended approach for versioning workflows in production.
Technical limits
| Limit | Value | Error code |
|---|---|---|
| Maximum nodes per workflow | 100 | FLK-0113 |
| Maximum edges per workflow | 200 | FLK-0114 |
| Maximum execution input payload | 1 MB | FLK-0506 |
Common patterns
Sequential
The simplest pattern. Nodes execute one after another in a linear chain. Use this when each step depends on the result of the previous one and there is no branching.
Example: Payment orchestration
Parallel (fan-out / fan-in)
Multiple executor nodes are started from a common entry point and their results are collected at a join node. Use this when independent checks or calls can happen concurrently to reduce total execution time.
This pattern is useful when you need to call multiple fraud or compliance providers simultaneously and aggregate their responses before making a routing decision.
Conditional branching
Aconditional node evaluates an expression and routes execution to different nodes depending on the result. Each outgoing edge from the conditional node carries a condition expression.
Example: Anti-fraud check
Real-world examples
Anti-fraud check
A transaction arrives, a fraud score is retrieved from an external engine, and the result routes execution to either an approval or rejection path.Payment orchestration
A linear flow that validates incoming payment data, routes it to the appropriate provider, and sends a confirmation.KYC onboarding
A customer’s documents are checked by an external service. A conditional node evaluates whether manual review is required. If so, a manual approval action is triggered before activating the account.Manual approval flow
A submission is sent for review. An approval action waits for a decision. A conditional node then routes to either the approved or rejected path.Best practices
Node naming conventions
Use descriptive, action-oriented names that communicate what the node does — not what type it is.- ✅
Validate Payment Data,Get Fraud Score,Notify Customer,Await Approval - ❌
executor1,conditional node,node3
Edge condition expressions
Conditions on edges are evaluated against the execution context. Keep them simple and explicit:- Use direct field comparisons:
data.status == 'approved' - Use numeric comparisons:
data.riskScore < 70 - Use boolean fields:
data.reviewRequired == true
conditional node that encapsulates the decision with a clear name.
An invalid expression returns FLK-0105. Always validate expressions before activating a workflow.
Error handling strategies
Design workflows to handle failure explicitly:- Add rejection paths from
conditionalnodes for every decision point that can fail. - Use separate
executornodes for retry logic or fallback providers. - Name error paths clearly (e.g.,
Reject and Notify,Fallback to Manual Review) so audit logs are self-explanatory.
Avoiding cycles
Flowker uses a DFS-based cycle guard at runtime. If a cycle is detected during execution, the workflow fails withFLK-0508. Cycles are not caught at design time, so validate your edge structure before activating.
Rules to prevent cycles:
- Edges must always point forward in the flow — never back to a previously executed node.
- Review the graph visually before activating any workflow with branching or merging paths.
- If a retry or loop is needed, model it as a separate workflow invocation, not a back-edge in the current graph.
Versioning via clone
Never edit an active workflow directly. Instead:- Clone the workflow (creates a new
draftwith all nodes and edges copied). - Make your changes in the draft.
- Test the draft with execution runs.
- Activate the new version.
- Deactivate the old version if it is no longer needed.
Error reference
The following error codes are relevant to workflow design and execution:
| Code | Description |
|---|---|
FLK-0102 | Invalid status transition |
FLK-0103 | Workflow cannot be modified — not in draft status |
FLK-0105 | Invalid conditional expression |
FLK-0113 | Too many nodes — maximum is 100 |
FLK-0114 | Too many edges — maximum is 200 |
FLK-0506 | Execution input payload too large — maximum is 1 MB |
FLK-0508 | Cycle detected during workflow execution |

