Skip to main content

Flow orchestration mode

Flow orchestration mode (LAYOUT) uses a visual canvas to chain multiple API calls, conditional branches, loops and data processing nodes into a single execution flow. It is suitable for aggregating multiple APIs, calling different downstream APIs based on conditions, and filtering, mapping or computing results.

Use cases​

  • A platform API needs to call multiple internal or external APIs in sequence.
  • Different branches are required based on upstream results.
  • List results need to be sorted, filtered, renamed or used in numeric calculations.
  • A list needs to be processed in a loop, with an API called for each item.
  • Internal APIs need to be chained into a business orchestration without writing code.

Canvas and nodes​

The canvas is based on LogicFlow. The node panel on the left is organized into four groups:

GroupNodes
BasicStart, End
ServiceAPI
LogicConditional branch, loop node, variable assignment, delay
DataData filter, field mapping, data calculation, data merge, data sort

Drag nodes onto the canvas, connect them to express execution order, and click a node to configure it on the right or in a dialog. The Start node receives API request parameters, and the End node determines the final response.

Node descriptions​

Start / End​

  • Each canvas must have exactly one Start node and one End node.
  • The Start node's request parameters come from the Request Parameters panel on the right.
  • The End node aggregates upstream results and outputs them according to Response Parameters on the right.

API call​

Calls an internal API or an external HTTP API:

ConfigurationDescription
API sourceInternal API (select an existing platform API) or external API (enter the URL manually)
Request protocolhttp / https for external APIs
API addressInternal API path or external domain + path
HTTP methodGET / POST / PUT / DELETE / PATCH
Response timeoutDefaults to 10000 ms
Request parametersParameter name + parameter type; values support #{variable}
Request headersOnly safe request headers are allowed to pass through
Result variableVariable name where the result is stored; defaults to data

When an internal API returns code=0, data is extracted automatically as the result; a non-zero business code is treated as a node failure. Internal API calls are also subject to gateway and API permissions.

Conditional branch​

Two modes are supported:

ModeDescription
Condition evaluationConfigure a set of conditions; if they are met, take the "true" branch; otherwise take the "false" branch
Multi-way branchConfigure multiple named branches + a default branch, matched in order

Operators include ==, !=, >, <, >=, <=, contains, in, notIn, startsWith, endsWith, regex, isNull, isNotNull, isEmpty and isNotEmpty. Conditions support AND/OR.

Every branch on the canvas must be connected to an outgoing edge with the corresponding label; a condition evaluation node must connect both the true and false outgoing edges, and a multi-way branch must connect an outgoing edge with the same label for each branch and the default branch.

Loop node​

ConfigurationDescription
Data sourceList variable name or #{data.list} path
Iteration variableVariable name for the current item, such as item
Index variableVariable name for the current index, such as index
Result variableVariable name of the aggregated result array
Execution modeSerial / parallel
ConcurrencyTakes effect in parallel mode; frontend 1–20, backend hard limit 20
Maximum iterationsDefault 1000, hard limit 10000; excess items are truncated
Failure strategyAbort (default) / continue (log the error and continue)

The end of the loop body must connect back to the loop node, and the loop node then follows the "Done" outgoing edge to continue the flow. Inside the loop body, #{item} and #{index} can be referenced.

Variable assignment​

Assigns values to variables in order and supports:

  • #{variable.path}: extracts the full value and preserves the nested structure.
  • {...} / [...]: JSON literals.
  • Other content is treated as a string literal.

Later assignments can reference target variables produced by earlier assignments.

Delay​

  • Supports a fixed value or #{variable}.
  • The maximum for a single delay is 60000 ms; larger values are capped at 60000 ms.
  • No delay occurs when parsing fails or the value is less than or equal to 0.

Data filter​

Filters the input list by conditions. The condition operators are the same as those for conditional branches, and multiple conditions support AND/OR. The default input and output variables are both data.

Field mapping​

Maps source fields to target fields:

  • Configure "source field → target field" one by one.
  • An optional expression is used for value transformation.
  • The default input and output variables are both data.

Data calculation​

Configures calculation formulas for response fields:

  • Supports addition, subtraction, multiplication and division across multiple numeric fields.
  • Supports string concatenation.
  • The input box supports #{value} references to API parameters.
  • The calculation result is assigned to the target field.

Data merge​

Merge typeDescription
ConcatenateConcatenates lists in upstream order
Merge and deduplicateDeduplicates and then merges
JoinPerforms a join merge by join field; the join field is required

By default, results from all upstream nodes are aggregated automatically; after data sources are selected, only the specified result variables are aggregated.

Data sort​

Select a field returned by the previous node and set ascending or descending order. The field type comes from the upstream response parameter definition.

Variables and expressions​

  • Request parameters, node parameter values and condition values all support #{variableName} or #{variable.path}.
  • Node results are written to the context through the Result variable; the default is data.
  • The Start node can reference API request parameters directly.
  • Expression parsing failures are usually treated as literals; refer to the node configuration hints for details.

Save and release validation​

Before saving, the platform validates the orchestration structure; if validation fails, the orchestration cannot be saved or released:

ValidationDescription
Start/End nodesExactly one of each
Node reachabilityAll nodes must be reachable from Start and able to reach End
CyclesNo cycles are allowed except for the loop body of a loop node itself
Branch labelsEach outgoing edge of a condition/loop node must select a valid label
Node countMaximum 1000
Node configurationRequired fields are validated for API, filter, mapping, sort, condition, loop, variable and delay nodes
Join mergeThe join field is required for the "Join" type

Execution limits​

ItemLimit
Orchestration nesting depthMaximum 8 levels (LAYOUT calling LAYOUT)
Single delay60000 ms
Maximum loop iterationsDefault 1000, hard limit 10000
Loop concurrencyMaximum 20
Node count1000
API node response timeoutDefault 10000 ms; configurable per node

Testing and troubleshooting​

  • Test in the upper right corner of the canvas executes the entire orchestration.
  • The test run returns an execution trace showing each node's status, input, output and duration; calls after release do not return a trace.
  • When an API node fails, the error message is written to the corresponding result variable and handled according to the node's failure strategy.
  • Common issues:
SymptomCauseResolution
Cannot save; an unreachable node is reportedThere is an isolated node or a broken connectionCheck the connections to ensure the flow is reachable from Start and can reach End
Cannot save; a branch is reported missing an outgoing edgeA condition/loop branch is not connected or the label does not matchConnect an outgoing edge with the matching label for each branch
The loop has no resultsThe data source is not a list or the variable name is wrongCheck the data source expression and the upstream result variable
The loop body does not executeThe "loop body" outgoing edge is missing or not connected back to the loop nodeComplete the loop body entry and back edge
API node reports that the call level is too deepLAYOUT nesting exceeds 8 levelsSplit the orchestration or change it to a single-level call
Delay is inaccurateVariable parsing failed or the value exceeds 60sCheck the variable value and the limit
Merge result is emptyThe data source selection is wrongCheck the upstream result variables and the merge type