Design workflows in Flowker with clarity and control. This guide walks through node types, edges, real-world patterns, status transitions, technical limits, and best practices to help you build reliable and maintainable orchestrations.Documentation Index
Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
Use this file to discover all available pages before exploring further.
Node types
Every workflow is built from nodes. Each node has a
type that defines how Flowker processes it at runtime.
trigger
The entry point of a workflow. Every workflow must start with a trigger node. When execution begins, the engine enters through this node and starts routing from it.executor
Calls an external executor, an HTTP service, API, or provider registered in Flowker. This is the core 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. Use conditional nodes to implement branching logic, for example, routing to an approval path when risk is high, or continuing directly when it is low.action
Represents internal workflow operations that do not involve external calls, such as transforming data, emitting events, or recording state changes.Edges
Edges connect nodes and define execution paths. Each edge includes the following fields:
| Field | Description |
|---|---|
id | Unique identifier for the edge. |
source | ID of the origin node. |
target | ID of the destination node. |
sourceHandle | Output port of the source node where the edge originates. |
condition | Expression that must evaluate to true for the edge to be followed. |
label | Human-readable label used for visualization and debugging. |
Example edge
condition field is evaluated against the execution context. If omitted, the edge is always followed when the source node completes successfully.
Status transitions
Workflows follow a well-defined lifecycle. Understanding these transitions is key to safely deploying and evolving 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, but it can be moved back to
draftfor editing.
Rules
- Only a
draftworkflow can be activated (transition:draft → active). - Only an
activeworkflow can be deactivated (transition:active → inactive). - Only an
inactiveworkflow can be moved back to draft (transition:inactive → draft). - Attempting an invalid transition returns error
FLK-0102. - Attempting to modify a workflow that is not in
draftreturns errorFLK-0103.
Moving an inactive workflow back to draft
If you deactivated a workflow and want to edit it again, move it back todraft by calling POST /v1/workflows/{id}/draft. This makes the workflow editable without needing to clone it.
This is useful when you deactivated a workflow by mistake or when you want to iterate on an existing workflow instead of creating a copy.
Only inactive workflows can be moved to draft. If you need to modify an active workflow without taking it offline, use the clone approach described below.
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 update, test, and activate it without impacting the current version.
This is the recommended approach for production versioning.
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 in a linear sequence. Use this when each step depends on the previous one and no branching is required.
Conditional branching
Aconditional node evaluates an expression and routes execution accordingly. Each outgoing edge carries its own condition.

Real-world examples
Anti-fraud check
A transaction arrives, a fraud score is retrieved, and execution is routed to approval or rejection.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.- correct:
Validate Payment Data,Get Fraud Score,Notify Customer,Await Approval - wrong:
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:
<nodeId>.status == 'approved' - Use numeric comparisons:
<nodeId>.riskScore < 70 - Use boolean fields:
<nodeId>.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:
This preserves the execution history of the active version and gives you a clean rollback path if the new version has issues.
Creating workflows from templates
Instead of building a workflow from scratch, you can create one from a pre-built template in the catalog. Templates provide ready-made node and edge structures for common patterns — payment validation, fraud checks, onboarding flows, and more. Call
POST /v1/workflows/from-template with the template ID, a name for the new workflow, and any parameters the template requires. The result is a new workflow in draft status that you can review, customize, and activate.
Example request
Example request
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 |

