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

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,80 @@
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": [{ "p": "topic", "v": "path_1", "vt": "str" }, { "p": "payload", "v": "hello-1", "vt": "str" }],
15
+ "x": 130,
16
+ "y": 100,
17
+ "wires": [["qs-jw"]]
18
+ },
19
+ {
20
+ "id": "qs-i2",
21
+ "type": "inject",
22
+ "z": "qs-tab",
23
+ "name": "path_2",
24
+ "props": [{ "p": "topic", "v": "path_2", "vt": "str" }, { "p": "payload", "v": "hello-2", "vt": "str" }],
25
+ "x": 130,
26
+ "y": 160,
27
+ "wires": [["qs-jw"]]
28
+ },
29
+ {
30
+ "id": "qs-jw",
31
+ "type": "join-wait",
32
+ "z": "qs-tab",
33
+ "name": "wait 5s",
34
+ "paths": ["path_1", "path_2"],
35
+ "pathsToExpire": [],
36
+ "useRegex": false,
37
+ "warnUnmatched": true,
38
+ "pathTopic": "topic",
39
+ "pathTopicType": "msg",
40
+ "correlationTopic": "",
41
+ "correlationTopicType": "undefined",
42
+ "timeout": "5",
43
+ "timeoutUnits": "1000",
44
+ "exactOrder": "false",
45
+ "firstMsg": "true",
46
+ "mapPayload": "true",
47
+ "disableComplete": false,
48
+ "persistOnRestart": false,
49
+ "persistStore": "",
50
+ "x": 360,
51
+ "y": 130,
52
+ "wires": [["qs-success"], ["qs-expired"]]
53
+ },
54
+ {
55
+ "id": "qs-success",
56
+ "type": "debug",
57
+ "z": "qs-tab",
58
+ "name": "success",
59
+ "active": true,
60
+ "tosidebar": true,
61
+ "console": false,
62
+ "complete": "true",
63
+ "x": 540,
64
+ "y": 100,
65
+ "wires": []
66
+ },
67
+ {
68
+ "id": "qs-expired",
69
+ "type": "debug",
70
+ "z": "qs-tab",
71
+ "name": "expired",
72
+ "active": true,
73
+ "tosidebar": true,
74
+ "console": false,
75
+ "complete": "true",
76
+ "x": 540,
77
+ "y": 160,
78
+ "wires": []
79
+ }
80
+ ]
@@ -0,0 +1,110 @@
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
+ "x": 120,
16
+ "y": 130,
17
+ "wires": [["corr-set1", "corr-delay", "corr-set3"]]
18
+ },
19
+ {
20
+ "id": "corr-set1",
21
+ "type": "change",
22
+ "z": "corr-tab",
23
+ "name": "topic = path_1",
24
+ "rules": [{ "t": "set", "p": "topic", "pt": "msg", "to": "path_1", "tot": "str" }],
25
+ "x": 320,
26
+ "y": 80,
27
+ "wires": [["corr-jw"]]
28
+ },
29
+ {
30
+ "id": "corr-delay",
31
+ "type": "delay",
32
+ "z": "corr-tab",
33
+ "name": "",
34
+ "pauseType": "delay",
35
+ "timeout": "1",
36
+ "timeoutUnits": "seconds",
37
+ "x": 320,
38
+ "y": 130,
39
+ "wires": [["corr-set2"]]
40
+ },
41
+ {
42
+ "id": "corr-set2",
43
+ "type": "change",
44
+ "z": "corr-tab",
45
+ "name": "topic = path_2",
46
+ "rules": [{ "t": "set", "p": "topic", "pt": "msg", "to": "path_2", "tot": "str" }],
47
+ "x": 480,
48
+ "y": 130,
49
+ "wires": [["corr-jw"]]
50
+ },
51
+ {
52
+ "id": "corr-set3",
53
+ "type": "change",
54
+ "z": "corr-tab",
55
+ "name": "topic = path_3",
56
+ "rules": [{ "t": "set", "p": "topic", "pt": "msg", "to": "path_3", "tot": "str" }],
57
+ "x": 320,
58
+ "y": 180,
59
+ "wires": [["corr-jw"]]
60
+ },
61
+ {
62
+ "id": "corr-jw",
63
+ "type": "join-wait",
64
+ "z": "corr-tab",
65
+ "name": "group by _msgid",
66
+ "paths": ["path_1", "path_2", "path_3"],
67
+ "pathsToExpire": [],
68
+ "useRegex": false,
69
+ "warnUnmatched": false,
70
+ "pathTopic": "topic",
71
+ "pathTopicType": "msg",
72
+ "correlationTopic": "_msgid",
73
+ "correlationTopicType": "msg",
74
+ "timeout": "10",
75
+ "timeoutUnits": "1000",
76
+ "exactOrder": "false",
77
+ "firstMsg": "true",
78
+ "mapPayload": "true",
79
+ "disableComplete": false,
80
+ "persistOnRestart": false,
81
+ "persistStore": "",
82
+ "x": 700,
83
+ "y": 130,
84
+ "wires": [["corr-ok"], ["corr-bad"]]
85
+ },
86
+ {
87
+ "id": "corr-ok",
88
+ "type": "debug",
89
+ "z": "corr-tab",
90
+ "name": "joined",
91
+ "active": true,
92
+ "tosidebar": true,
93
+ "complete": "true",
94
+ "x": 880,
95
+ "y": 100,
96
+ "wires": []
97
+ },
98
+ {
99
+ "id": "corr-bad",
100
+ "type": "debug",
101
+ "z": "corr-tab",
102
+ "name": "expired",
103
+ "active": true,
104
+ "tosidebar": true,
105
+ "complete": "true",
106
+ "x": 880,
107
+ "y": 160,
108
+ "wires": []
109
+ }
110
+ ]
@@ -0,0 +1,88 @@
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", "v": "path_1", "vt": "str" }],
15
+ "x": 130,
16
+ "y": 80,
17
+ "wires": [["rst-jw"]]
18
+ },
19
+ {
20
+ "id": "rst-i2",
21
+ "type": "inject",
22
+ "z": "rst-tab",
23
+ "name": "path_2",
24
+ "props": [{ "p": "topic", "v": "path_2", "vt": "str" }],
25
+ "x": 130,
26
+ "y": 130,
27
+ "wires": [["rst-jw"]]
28
+ },
29
+ {
30
+ "id": "rst-i3",
31
+ "type": "inject",
32
+ "z": "rst-tab",
33
+ "name": "reset",
34
+ "props": [{ "p": "topic", "v": "abort", "vt": "str" }],
35
+ "x": 130,
36
+ "y": 200,
37
+ "wires": [["rst-jw"]]
38
+ },
39
+ {
40
+ "id": "rst-jw",
41
+ "type": "join-wait",
42
+ "z": "rst-tab",
43
+ "name": "wait + abort",
44
+ "paths": ["path_1", "path_2"],
45
+ "pathsToExpire": ["abort"],
46
+ "useRegex": false,
47
+ "warnUnmatched": true,
48
+ "pathTopic": "topic",
49
+ "pathTopicType": "msg",
50
+ "correlationTopic": "",
51
+ "correlationTopicType": "undefined",
52
+ "timeout": "10",
53
+ "timeoutUnits": "1000",
54
+ "exactOrder": "false",
55
+ "firstMsg": "true",
56
+ "mapPayload": "true",
57
+ "disableComplete": false,
58
+ "persistOnRestart": false,
59
+ "persistStore": "",
60
+ "x": 360,
61
+ "y": 130,
62
+ "wires": [["rst-success"], ["rst-expired"]]
63
+ },
64
+ {
65
+ "id": "rst-success",
66
+ "type": "debug",
67
+ "z": "rst-tab",
68
+ "name": "success",
69
+ "active": true,
70
+ "tosidebar": true,
71
+ "complete": "true",
72
+ "x": 540,
73
+ "y": 100,
74
+ "wires": []
75
+ },
76
+ {
77
+ "id": "rst-expired",
78
+ "type": "debug",
79
+ "z": "rst-tab",
80
+ "name": "expired",
81
+ "active": true,
82
+ "tosidebar": true,
83
+ "complete": "true",
84
+ "x": 540,
85
+ "y": 160,
86
+ "wires": []
87
+ }
88
+ ]
@@ -0,0 +1,84 @@
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", "v": "sensor_a", "vt": "str" },
16
+ { "p": "payload", "v": "42", "vt": "num" }
17
+ ],
18
+ "x": 130,
19
+ "y": 80,
20
+ "wires": [["rx-jw"]]
21
+ },
22
+ {
23
+ "id": "rx-i2",
24
+ "type": "inject",
25
+ "z": "rx-tab",
26
+ "name": "heartbeat",
27
+ "props": [
28
+ { "p": "topic", "v": "heartbeat", "vt": "str" },
29
+ { "p": "payload", "v": "ok", "vt": "str" }
30
+ ],
31
+ "x": 130,
32
+ "y": 140,
33
+ "wires": [["rx-jw"]]
34
+ },
35
+ {
36
+ "id": "rx-jw",
37
+ "type": "join-wait",
38
+ "z": "rx-tab",
39
+ "name": "regex match",
40
+ "paths": ["^sensor_[abc]$", "^heartbeat$"],
41
+ "pathsToExpire": [],
42
+ "useRegex": true,
43
+ "warnUnmatched": false,
44
+ "pathTopic": "topic",
45
+ "pathTopicType": "msg",
46
+ "correlationTopic": "",
47
+ "correlationTopicType": "undefined",
48
+ "timeout": "10",
49
+ "timeoutUnits": "1000",
50
+ "exactOrder": "false",
51
+ "firstMsg": "true",
52
+ "mapPayload": "true",
53
+ "disableComplete": false,
54
+ "persistOnRestart": false,
55
+ "persistStore": "",
56
+ "x": 360,
57
+ "y": 110,
58
+ "wires": [["rx-success"], ["rx-expired"]]
59
+ },
60
+ {
61
+ "id": "rx-success",
62
+ "type": "debug",
63
+ "z": "rx-tab",
64
+ "name": "success",
65
+ "active": true,
66
+ "tosidebar": true,
67
+ "complete": "true",
68
+ "x": 540,
69
+ "y": 80,
70
+ "wires": []
71
+ },
72
+ {
73
+ "id": "rx-expired",
74
+ "type": "debug",
75
+ "z": "rx-tab",
76
+ "name": "expired",
77
+ "active": true,
78
+ "tosidebar": true,
79
+ "complete": "true",
80
+ "x": 540,
81
+ "y": 140,
82
+ "wires": []
83
+ }
84
+ ]
@@ -0,0 +1,88 @@
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", "v": "start", "vt": "str" }],
15
+ "x": 130,
16
+ "y": 80,
17
+ "wires": [["eo-jw"]]
18
+ },
19
+ {
20
+ "id": "eo-i2",
21
+ "type": "inject",
22
+ "z": "eo-tab",
23
+ "name": "work",
24
+ "props": [{ "p": "topic", "v": "work", "vt": "str" }],
25
+ "x": 130,
26
+ "y": 130,
27
+ "wires": [["eo-jw"]]
28
+ },
29
+ {
30
+ "id": "eo-i3",
31
+ "type": "inject",
32
+ "z": "eo-tab",
33
+ "name": "end",
34
+ "props": [{ "p": "topic", "v": "end", "vt": "str" }],
35
+ "x": 130,
36
+ "y": 180,
37
+ "wires": [["eo-jw"]]
38
+ },
39
+ {
40
+ "id": "eo-jw",
41
+ "type": "join-wait",
42
+ "z": "eo-tab",
43
+ "name": "exact: start, work, work, end",
44
+ "paths": ["start", "work", "work", "end"],
45
+ "pathsToExpire": [],
46
+ "useRegex": false,
47
+ "warnUnmatched": false,
48
+ "pathTopic": "topic",
49
+ "pathTopicType": "msg",
50
+ "correlationTopic": "",
51
+ "correlationTopicType": "undefined",
52
+ "timeout": "10",
53
+ "timeoutUnits": "1000",
54
+ "exactOrder": "true",
55
+ "firstMsg": "true",
56
+ "mapPayload": "true",
57
+ "disableComplete": false,
58
+ "persistOnRestart": false,
59
+ "persistStore": "",
60
+ "x": 410,
61
+ "y": 130,
62
+ "wires": [["eo-success"], ["eo-expired"]]
63
+ },
64
+ {
65
+ "id": "eo-success",
66
+ "type": "debug",
67
+ "z": "eo-tab",
68
+ "name": "success",
69
+ "active": true,
70
+ "tosidebar": true,
71
+ "complete": "true",
72
+ "x": 640,
73
+ "y": 100,
74
+ "wires": []
75
+ },
76
+ {
77
+ "id": "eo-expired",
78
+ "type": "debug",
79
+ "z": "eo-tab",
80
+ "name": "expired",
81
+ "active": true,
82
+ "tosidebar": true,
83
+ "complete": "true",
84
+ "x": 640,
85
+ "y": 160,
86
+ "wires": []
87
+ }
88
+ ]