node-red-contrib-join-wait 0.5.3 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,96 @@
1
+ [
2
+ {
3
+ "id": "qs-tab",
4
+ "type": "tab",
5
+ "label": "join-wait quickstart",
6
+ "disabled": false,
7
+ "info": "Inject path_1 and path_2 within 5s — both reach success.\nInject only one — it goes to expired."
8
+ },
9
+ {
10
+ "id": "qs-i1",
11
+ "type": "inject",
12
+ "z": "qs-tab",
13
+ "name": "path_1",
14
+ "props": [
15
+ { "p": "topic", "vt": "str" },
16
+ { "p": "payload", "v": "hello-1", "vt": "str" }
17
+ ],
18
+ "repeat": "",
19
+ "crontab": "",
20
+ "once": false,
21
+ "onceDelay": "",
22
+ "topic": "path_1",
23
+ "x": 130,
24
+ "y": 100,
25
+ "wires": [["qs-jw"]]
26
+ },
27
+ {
28
+ "id": "qs-i2",
29
+ "type": "inject",
30
+ "z": "qs-tab",
31
+ "name": "path_2",
32
+ "props": [
33
+ { "p": "topic", "vt": "str" },
34
+ { "p": "payload", "v": "hello-2", "vt": "str" }
35
+ ],
36
+ "repeat": "",
37
+ "crontab": "",
38
+ "once": false,
39
+ "onceDelay": "",
40
+ "topic": "path_2",
41
+ "x": 130,
42
+ "y": 160,
43
+ "wires": [["qs-jw"]]
44
+ },
45
+ {
46
+ "id": "qs-jw",
47
+ "type": "join-wait",
48
+ "z": "qs-tab",
49
+ "name": "wait 5s",
50
+ "paths": ["path_1", "path_2"],
51
+ "pathsToExpire": [],
52
+ "useRegex": false,
53
+ "warnUnmatched": true,
54
+ "pathTopic": "topic",
55
+ "pathTopicType": "msg",
56
+ "correlationTopic": "",
57
+ "correlationTopicType": "undefined",
58
+ "timeout": "5",
59
+ "timeoutUnits": "1000",
60
+ "exactOrder": "false",
61
+ "firstMsg": "true",
62
+ "mapPayload": "true",
63
+ "disableComplete": false,
64
+ "persistOnRestart": false,
65
+ "persistStore": "",
66
+ "x": 360,
67
+ "y": 130,
68
+ "wires": [["qs-success"], ["qs-expired"]]
69
+ },
70
+ {
71
+ "id": "qs-success",
72
+ "type": "debug",
73
+ "z": "qs-tab",
74
+ "name": "success",
75
+ "active": true,
76
+ "tosidebar": true,
77
+ "console": false,
78
+ "complete": "true",
79
+ "x": 540,
80
+ "y": 100,
81
+ "wires": []
82
+ },
83
+ {
84
+ "id": "qs-expired",
85
+ "type": "debug",
86
+ "z": "qs-tab",
87
+ "name": "expired",
88
+ "active": true,
89
+ "tosidebar": true,
90
+ "console": false,
91
+ "complete": "true",
92
+ "x": 540,
93
+ "y": 160,
94
+ "wires": []
95
+ }
96
+ ]
@@ -0,0 +1,139 @@
1
+ [
2
+ {
3
+ "id": "corr-tab",
4
+ "type": "tab",
5
+ "label": "join-wait correlation",
6
+ "disabled": false,
7
+ "info": "Two parallel orders share a join-wait via msg._msgid.\nOnly messages from the same originating msg get joined."
8
+ },
9
+ {
10
+ "id": "corr-inject",
11
+ "type": "inject",
12
+ "z": "corr-tab",
13
+ "name": "split flow",
14
+ "props": [{ "p": "payload", "v": "{}", "vt": "json" }],
15
+ "repeat": "",
16
+ "crontab": "",
17
+ "once": false,
18
+ "onceDelay": "",
19
+ "topic": "",
20
+ "x": 120,
21
+ "y": 130,
22
+ "wires": [["corr-set1", "corr-delay", "corr-set3"]]
23
+ },
24
+ {
25
+ "id": "corr-set1",
26
+ "type": "change",
27
+ "z": "corr-tab",
28
+ "name": "topic = path_1",
29
+ "rules": [{ "t": "set", "p": "topic", "pt": "msg", "to": "path_1", "tot": "str" }],
30
+ "action": "",
31
+ "property": "",
32
+ "from": "",
33
+ "to": "",
34
+ "reg": false,
35
+ "x": 320,
36
+ "y": 80,
37
+ "wires": [["corr-jw"]]
38
+ },
39
+ {
40
+ "id": "corr-delay",
41
+ "type": "delay",
42
+ "z": "corr-tab",
43
+ "name": "",
44
+ "pauseType": "delay",
45
+ "timeout": "1",
46
+ "timeoutUnits": "seconds",
47
+ "rate": "1",
48
+ "nbRateUnits": "1",
49
+ "rateUnits": "second",
50
+ "randomFirst": "1",
51
+ "randomLast": "5",
52
+ "randomUnits": "seconds",
53
+ "drop": false,
54
+ "allowrate": false,
55
+ "outputs": 1,
56
+ "x": 320,
57
+ "y": 130,
58
+ "wires": [["corr-set2"]]
59
+ },
60
+ {
61
+ "id": "corr-set2",
62
+ "type": "change",
63
+ "z": "corr-tab",
64
+ "name": "topic = path_2",
65
+ "rules": [{ "t": "set", "p": "topic", "pt": "msg", "to": "path_2", "tot": "str" }],
66
+ "action": "",
67
+ "property": "",
68
+ "from": "",
69
+ "to": "",
70
+ "reg": false,
71
+ "x": 480,
72
+ "y": 130,
73
+ "wires": [["corr-jw"]]
74
+ },
75
+ {
76
+ "id": "corr-set3",
77
+ "type": "change",
78
+ "z": "corr-tab",
79
+ "name": "topic = path_3",
80
+ "rules": [{ "t": "set", "p": "topic", "pt": "msg", "to": "path_3", "tot": "str" }],
81
+ "action": "",
82
+ "property": "",
83
+ "from": "",
84
+ "to": "",
85
+ "reg": false,
86
+ "x": 320,
87
+ "y": 180,
88
+ "wires": [["corr-jw"]]
89
+ },
90
+ {
91
+ "id": "corr-jw",
92
+ "type": "join-wait",
93
+ "z": "corr-tab",
94
+ "name": "group by _msgid",
95
+ "paths": ["path_1", "path_2", "path_3"],
96
+ "pathsToExpire": [],
97
+ "useRegex": false,
98
+ "warnUnmatched": false,
99
+ "pathTopic": "topic",
100
+ "pathTopicType": "msg",
101
+ "correlationTopic": "_msgid",
102
+ "correlationTopicType": "msg",
103
+ "timeout": "10",
104
+ "timeoutUnits": "1000",
105
+ "exactOrder": "false",
106
+ "firstMsg": "true",
107
+ "mapPayload": "true",
108
+ "disableComplete": false,
109
+ "persistOnRestart": false,
110
+ "persistStore": "",
111
+ "x": 700,
112
+ "y": 130,
113
+ "wires": [["corr-ok"], ["corr-bad"]]
114
+ },
115
+ {
116
+ "id": "corr-ok",
117
+ "type": "debug",
118
+ "z": "corr-tab",
119
+ "name": "joined",
120
+ "active": true,
121
+ "tosidebar": true,
122
+ "complete": "true",
123
+ "x": 880,
124
+ "y": 100,
125
+ "wires": []
126
+ },
127
+ {
128
+ "id": "corr-bad",
129
+ "type": "debug",
130
+ "z": "corr-tab",
131
+ "name": "expired",
132
+ "active": true,
133
+ "tosidebar": true,
134
+ "complete": "true",
135
+ "x": 880,
136
+ "y": 160,
137
+ "wires": []
138
+ }
139
+ ]
@@ -0,0 +1,103 @@
1
+ [
2
+ {
3
+ "id": "rst-tab",
4
+ "type": "tab",
5
+ "label": "join-wait reset paths",
6
+ "disabled": false,
7
+ "info": "If 'reset' arrives before path_1 + path_2, the queue is drained\nto the expired output instead of completing."
8
+ },
9
+ {
10
+ "id": "rst-i1",
11
+ "type": "inject",
12
+ "z": "rst-tab",
13
+ "name": "path_1",
14
+ "props": [{ "p": "topic", "vt": "str" }],
15
+ "repeat": "",
16
+ "crontab": "",
17
+ "once": false,
18
+ "onceDelay": "",
19
+ "topic": "path_1",
20
+ "x": 130,
21
+ "y": 80,
22
+ "wires": [["rst-jw"]]
23
+ },
24
+ {
25
+ "id": "rst-i2",
26
+ "type": "inject",
27
+ "z": "rst-tab",
28
+ "name": "path_2",
29
+ "props": [{ "p": "topic", "vt": "str" }],
30
+ "repeat": "",
31
+ "crontab": "",
32
+ "once": false,
33
+ "onceDelay": "",
34
+ "topic": "path_2",
35
+ "x": 130,
36
+ "y": 130,
37
+ "wires": [["rst-jw"]]
38
+ },
39
+ {
40
+ "id": "rst-i3",
41
+ "type": "inject",
42
+ "z": "rst-tab",
43
+ "name": "reset",
44
+ "props": [{ "p": "topic", "vt": "str" }],
45
+ "repeat": "",
46
+ "crontab": "",
47
+ "once": false,
48
+ "onceDelay": "",
49
+ "topic": "abort",
50
+ "x": 130,
51
+ "y": 200,
52
+ "wires": [["rst-jw"]]
53
+ },
54
+ {
55
+ "id": "rst-jw",
56
+ "type": "join-wait",
57
+ "z": "rst-tab",
58
+ "name": "wait + abort",
59
+ "paths": ["path_1", "path_2"],
60
+ "pathsToExpire": ["abort"],
61
+ "useRegex": false,
62
+ "warnUnmatched": true,
63
+ "pathTopic": "topic",
64
+ "pathTopicType": "msg",
65
+ "correlationTopic": "",
66
+ "correlationTopicType": "undefined",
67
+ "timeout": "10",
68
+ "timeoutUnits": "1000",
69
+ "exactOrder": "false",
70
+ "firstMsg": "true",
71
+ "mapPayload": "true",
72
+ "disableComplete": false,
73
+ "persistOnRestart": false,
74
+ "persistStore": "",
75
+ "x": 360,
76
+ "y": 130,
77
+ "wires": [["rst-success"], ["rst-expired"]]
78
+ },
79
+ {
80
+ "id": "rst-success",
81
+ "type": "debug",
82
+ "z": "rst-tab",
83
+ "name": "success",
84
+ "active": true,
85
+ "tosidebar": true,
86
+ "complete": "true",
87
+ "x": 540,
88
+ "y": 100,
89
+ "wires": []
90
+ },
91
+ {
92
+ "id": "rst-expired",
93
+ "type": "debug",
94
+ "z": "rst-tab",
95
+ "name": "expired",
96
+ "active": true,
97
+ "tosidebar": true,
98
+ "complete": "true",
99
+ "x": 540,
100
+ "y": 160,
101
+ "wires": []
102
+ }
103
+ ]
@@ -0,0 +1,94 @@
1
+ [
2
+ {
3
+ "id": "rx-tab",
4
+ "type": "tab",
5
+ "label": "join-wait regex paths",
6
+ "disabled": false,
7
+ "info": "Wait for any one of sensor_a/sensor_b/sensor_c plus heartbeat,\nmatched by regex. Useful when path names follow a naming convention."
8
+ },
9
+ {
10
+ "id": "rx-i1",
11
+ "type": "inject",
12
+ "z": "rx-tab",
13
+ "name": "sensor_a",
14
+ "props": [
15
+ { "p": "topic", "vt": "str" },
16
+ { "p": "payload", "v": "42", "vt": "num" }
17
+ ],
18
+ "repeat": "",
19
+ "crontab": "",
20
+ "once": false,
21
+ "onceDelay": "",
22
+ "topic": "sensor_a",
23
+ "x": 130,
24
+ "y": 80,
25
+ "wires": [["rx-jw"]]
26
+ },
27
+ {
28
+ "id": "rx-i2",
29
+ "type": "inject",
30
+ "z": "rx-tab",
31
+ "name": "heartbeat",
32
+ "props": [
33
+ { "p": "topic", "vt": "str" },
34
+ { "p": "payload", "v": "ok", "vt": "str" }
35
+ ],
36
+ "repeat": "",
37
+ "crontab": "",
38
+ "once": false,
39
+ "onceDelay": "",
40
+ "topic": "heartbeat",
41
+ "x": 130,
42
+ "y": 140,
43
+ "wires": [["rx-jw"]]
44
+ },
45
+ {
46
+ "id": "rx-jw",
47
+ "type": "join-wait",
48
+ "z": "rx-tab",
49
+ "name": "regex match",
50
+ "paths": ["^sensor_[abc]$", "^heartbeat$"],
51
+ "pathsToExpire": [],
52
+ "useRegex": true,
53
+ "warnUnmatched": false,
54
+ "pathTopic": "topic",
55
+ "pathTopicType": "msg",
56
+ "correlationTopic": "",
57
+ "correlationTopicType": "undefined",
58
+ "timeout": "10",
59
+ "timeoutUnits": "1000",
60
+ "exactOrder": "false",
61
+ "firstMsg": "true",
62
+ "mapPayload": "true",
63
+ "disableComplete": false,
64
+ "persistOnRestart": false,
65
+ "persistStore": "",
66
+ "x": 360,
67
+ "y": 110,
68
+ "wires": [["rx-success"], ["rx-expired"]]
69
+ },
70
+ {
71
+ "id": "rx-success",
72
+ "type": "debug",
73
+ "z": "rx-tab",
74
+ "name": "success",
75
+ "active": true,
76
+ "tosidebar": true,
77
+ "complete": "true",
78
+ "x": 540,
79
+ "y": 80,
80
+ "wires": []
81
+ },
82
+ {
83
+ "id": "rx-expired",
84
+ "type": "debug",
85
+ "z": "rx-tab",
86
+ "name": "expired",
87
+ "active": true,
88
+ "tosidebar": true,
89
+ "complete": "true",
90
+ "x": 540,
91
+ "y": 140,
92
+ "wires": []
93
+ }
94
+ ]
@@ -0,0 +1,103 @@
1
+ [
2
+ {
3
+ "id": "eo-tab",
4
+ "type": "tab",
5
+ "label": "join-wait exact order",
6
+ "disabled": false,
7
+ "info": "Match the precise sequence start → work → work → end.\nThe `work` step must arrive twice. Out-of-order arrivals are\nexpired."
8
+ },
9
+ {
10
+ "id": "eo-i1",
11
+ "type": "inject",
12
+ "z": "eo-tab",
13
+ "name": "start",
14
+ "props": [{ "p": "topic", "vt": "str" }],
15
+ "repeat": "",
16
+ "crontab": "",
17
+ "once": false,
18
+ "onceDelay": "",
19
+ "topic": "start",
20
+ "x": 130,
21
+ "y": 80,
22
+ "wires": [["eo-jw"]]
23
+ },
24
+ {
25
+ "id": "eo-i2",
26
+ "type": "inject",
27
+ "z": "eo-tab",
28
+ "name": "work",
29
+ "props": [{ "p": "topic", "vt": "str" }],
30
+ "repeat": "",
31
+ "crontab": "",
32
+ "once": false,
33
+ "onceDelay": "",
34
+ "topic": "work",
35
+ "x": 130,
36
+ "y": 130,
37
+ "wires": [["eo-jw"]]
38
+ },
39
+ {
40
+ "id": "eo-i3",
41
+ "type": "inject",
42
+ "z": "eo-tab",
43
+ "name": "end",
44
+ "props": [{ "p": "topic", "vt": "str" }],
45
+ "repeat": "",
46
+ "crontab": "",
47
+ "once": false,
48
+ "onceDelay": "",
49
+ "topic": "end",
50
+ "x": 130,
51
+ "y": 180,
52
+ "wires": [["eo-jw"]]
53
+ },
54
+ {
55
+ "id": "eo-jw",
56
+ "type": "join-wait",
57
+ "z": "eo-tab",
58
+ "name": "exact: start, work, work, end",
59
+ "paths": ["start", "work", "work", "end"],
60
+ "pathsToExpire": [],
61
+ "useRegex": false,
62
+ "warnUnmatched": false,
63
+ "pathTopic": "topic",
64
+ "pathTopicType": "msg",
65
+ "correlationTopic": "",
66
+ "correlationTopicType": "undefined",
67
+ "timeout": "10",
68
+ "timeoutUnits": "1000",
69
+ "exactOrder": "true",
70
+ "firstMsg": "true",
71
+ "mapPayload": "true",
72
+ "disableComplete": false,
73
+ "persistOnRestart": false,
74
+ "persistStore": "",
75
+ "x": 410,
76
+ "y": 130,
77
+ "wires": [["eo-success"], ["eo-expired"]]
78
+ },
79
+ {
80
+ "id": "eo-success",
81
+ "type": "debug",
82
+ "z": "eo-tab",
83
+ "name": "success",
84
+ "active": true,
85
+ "tosidebar": true,
86
+ "complete": "true",
87
+ "x": 640,
88
+ "y": 100,
89
+ "wires": []
90
+ },
91
+ {
92
+ "id": "eo-expired",
93
+ "type": "debug",
94
+ "z": "eo-tab",
95
+ "name": "expired",
96
+ "active": true,
97
+ "tosidebar": true,
98
+ "complete": "true",
99
+ "x": 640,
100
+ "y": 160,
101
+ "wires": []
102
+ }
103
+ ]