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:
| Group | Nodes |
|---|---|
| Basic | Start, End |
| Service | API |
| Logic | Conditional branch, loop node, variable assignment, delay |
| Data | Data 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:
| Configuration | Description |
|---|---|
| API source | Internal API (select an existing platform API) or external API (enter the URL manually) |
| Request protocol | http / https for external APIs |
| API address | Internal API path or external domain + path |
| HTTP method | GET / POST / PUT / DELETE / PATCH |
| Response timeout | Defaults to 10000 ms |
| Request parameters | Parameter name + parameter type; values support #{variable} |
| Request headers | Only safe request headers are allowed to pass through |
| Result variable | Variable 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:
| Mode | Description |
|---|---|
| Condition evaluation | Configure a set of conditions; if they are met, take the "true" branch; otherwise take the "false" branch |
| Multi-way branch | Configure 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
| Configuration | Description |
|---|---|
| Data source | List variable name or #{data.list} path |
| Iteration variable | Variable name for the current item, such as item |
| Index variable | Variable name for the current index, such as index |
| Result variable | Variable name of the aggregated result array |
| Execution mode | Serial / parallel |
| Concurrency | Takes effect in parallel mode; frontend 1–20, backend hard limit 20 |
| Maximum iterations | Default 1000, hard limit 10000; excess items are truncated |
| Failure strategy | Abort (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 type | Description |
|---|---|
| Concatenate | Concatenates lists in upstream order |
| Merge and deduplicate | Deduplicates and then merges |
| Join | Performs 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:
| Validation | Description |
|---|---|
| Start/End nodes | Exactly one of each |
| Node reachability | All nodes must be reachable from Start and able to reach End |
| Cycles | No cycles are allowed except for the loop body of a loop node itself |
| Branch labels | Each outgoing edge of a condition/loop node must select a valid label |
| Node count | Maximum 1000 |
| Node configuration | Required fields are validated for API, filter, mapping, sort, condition, loop, variable and delay nodes |
| Join merge | The join field is required for the "Join" type |
Execution limits
| Item | Limit |
|---|---|
| Orchestration nesting depth | Maximum 8 levels (LAYOUT calling LAYOUT) |
| Single delay | 60000 ms |
| Maximum loop iterations | Default 1000, hard limit 10000 |
| Loop concurrency | Maximum 20 |
| Node count | 1000 |
| API node response timeout | Default 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:
| Symptom | Cause | Resolution |
|---|---|---|
| Cannot save; an unreachable node is reported | There is an isolated node or a broken connection | Check the connections to ensure the flow is reachable from Start and can reach End |
| Cannot save; a branch is reported missing an outgoing edge | A condition/loop branch is not connected or the label does not match | Connect an outgoing edge with the matching label for each branch |
| The loop has no results | The data source is not a list or the variable name is wrong | Check the data source expression and the upstream result variable |
| The loop body does not execute | The "loop body" outgoing edge is missing or not connected back to the loop node | Complete the loop body entry and back edge |
| API node reports that the call level is too deep | LAYOUT nesting exceeds 8 levels | Split the orchestration or change it to a single-level call |
| Delay is inaccurate | Variable parsing failed or the value exceeds 60s | Check the variable value and the limit |
| Merge result is empty | The data source selection is wrong | Check the upstream result variables and the merge type |