join
join component: Join node. Gather and merge the results of multiple asynchronous node executions. Example: Retrieve data from different databases or call APIs, then merge.
# Configuration
| Field | Type | Required | Description | Default |
|---|---|---|---|---|
| timeout | int | No | Execution timeout in seconds, 0: no timeout | 0 |
| mergeToMap | bool | No | Whether to merge the results into a map. false: result is []WrapperMsg list; true: result merged into Map (JSON merges fields, others use nodeId as key) | false |
# Relation Type
- Success: Send the message to the
Successchain. - Failure: If execution times out or node execution fails, send to the
Failurechain.
# Execution Result
- metadata: Merge the metadata after each node is processed, and override if the same key exists.
- data: Determine merge strategy based on
mergeToMapconfiguration:mergeToMap=false(default): Encapsulate messages processed by all nodes into aWrapperMsgarray.mergeToMap=true: Merge data from all nodes into a single Map.- If the node output is in JSON format, merge its fields into the result Map.
- If the node output is not in JSON format, merge it into the result Map using the node ID as the key and the message content as the value.
Example of merged result when mergeToMap=true:
Assuming there are three nodes:
- Node A (id=nodeA) output:
{"temperature": 25} - Node B (id=nodeB) output:
{"humidity": 60} - Node C (id=nodeC) output:
running(Non-JSON)
Merged data result:
{
"temperature": 25,
"humidity": 60,
"nodeC": "running"
}
1
2
3
4
5
2
3
4
5
WrapperMsg Structure (Valid only when mergeToMap=false):
| Field | Type | Description | Default |
|---|---|---|---|
| msg | types.RuleMsg without merging metadata | Message conforms | None |
| err | string | "" | |
| nodeId | string | The last processing node | "" |
# Configuration Example
{
"ruleChain": {
"id": "frcYgBtVbDaV",
"name": "Test Merge Node",
"debugMode": true,
"root": true,
"additionalInfo": {
"createTime": "2024/09/24 16:56:52",
"description": "",
"layoutX": "280",
"layoutY": "280",
"updateTime": "2024/09/24 21:50:38",
"username": "admin"
}
},
"metadata": {
"endpoints": [],
"nodes": [
{
"id": "node_a",
"additionalInfo": {
"description": "",
"layoutX": 490,
"layoutY": 280
},
"type": "jsTransform",
"name": "A",
"debugMode": false,
"configuration": {
"jsScript": "msg.a=\"aa\"\nreturn {'msg':msg,'metadata':metadata,'msgType':msgType};"
}
},
{
"id": "node_b",
"additionalInfo": {
"description": "",
"layoutX": 730,
"layoutY": 210
},
"type": "jsTransform",
"name": "B",
"debugMode": false,
"configuration": {
"jsScript": "msg.b=\"bb\"\nreturn {'msg':msg,'metadata':metadata,'msgType':msgType};"
}
},
{
"id": "node_c",
"additionalInfo": {
"description": "",
"layoutX": 730,
"layoutY": 340
},
"type": "jsTransform",
"name": "C",
"debugMode": false,
"configuration": {
"jsScript": "msg.c=\"cc\"\nreturn {'msg':msg,'metadata':metadata,'msgType':msgType};"
}
},
{
"id": "node_d",
"additionalInfo": {
"description": "",
"layoutX": 1010,
"layoutY": 260
},
"type": "join",
"name": "D",
"debugMode": false,
"configuration": {
"timeout": 1
}
}
],
"connections": [
{
"fromId": "node_a",
"toId": "node_b",
"type": "Success"
},
{
"fromId": "node_a",
"toId": "node_c",
"type": "Success"
},
{
"fromId": "node_b",
"toId": "node_d",
"type": "Success"
},
{
"fromId": "node_c",
"toId": "node_d",
"type": "Success"
}
]
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
Edit this page on GitHub (opens new window)
Last Updated: 2025/12/10, 11:02:18