- 简介
- 入门指南
- 使用 BPMN 进行流程建模
- 使用 案例管理 进行流程建模
- Process modeling with Flow
- 入门指南
- 核心概念
- Node reference
- Build guides
- 最佳实践
- 参考
- 流程实施
- 流程运营
- 流程监控
- 流程优化
- 参考信息
Maestro 用户指南
Waits for all incoming parallel branches to complete before passing execution to the next node.
When to use Merge
Use Merge when you have split execution into genuinely parallel branches (by drawing multiple connections from a single node's output port) and need to continue only after all branches finish.
You do not need Merge after a Decision or Switch node — those branches are mutually exclusive, not parallel. They converge naturally without a Merge node.
配置
The Merge node has no configuration fields. It automatically infers the number of incoming branches from the connections on the canvas.
工作方式
As branches complete, the Merge node collects their output variables. When the last branch finishes, Merge activates its single output port. All output variables from all branches are available to downstream nodes.
示例
Parallel API calls that are then combined:
Trigger → [HTTP Request A] → Merge → Script (combine A and B results)
→ [HTTP Request B] ↗
Trigger → [HTTP Request A] → Merge → Script (combine A and B results)
→ [HTTP Request B] ↗
The Script node after Merge can reference both httpRequestA.body and httpRequestB.body.
Run three enrichment steps in parallel:
Trigger → [Enrich from CRM] ↘
→ [Enrich from billing] → Merge → Data Transform (combine all three)
→ [Enrich from support] ↗
Trigger → [Enrich from CRM] ↘
→ [Enrich from billing] → Merge → Data Transform (combine all three)
→ [Enrich from support] ↗
常见问题
| 问题 | 分辨率 |
|---|---|
| Two branches produce a variable with the same name | The last branch to complete wins. Rename one of the conflicting output variables to avoid the collision. |
| One branch fails and the Merge never completes | If any incoming branch raises an unhandled error, Merge raises an error and stops waiting for remaining branches. Connect the error handle on failure-prone nodes in each branch so the failure is handled before it reaches the Merge. |
| Using Merge after a Decision node | Branches from a Decision node are mutually exclusive — only one fires. A Merge node after them waits forever for the second branch that never runs. Remove the Merge; the branches re-join implicitly. |
注意
- There is no timeout on Merge. If a branch hangs (for example, a Human Task waiting for a response), the Merge waits indefinitely unless you add a timeout to the hanging node.