@gregoriusrippenstein/erlang-red-unittest 0.21.0 → 0.21.4
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.
- package/examples/assert values/ignores failures if requested and boolean not-equal test.json +1 -0
- package/examples/catch/catch all in group except those handler elsewhere.json +1 -1
- package/examples/catch/deal with it yourself.json +1 -1
- package/examples/catch/don't catch if the node isn't selected.json +1 -1
- package/examples/change/set functionality.json +1 -1
- package/examples/complete/split node.json +1 -1
- package/examples/debug/Jsonata expressions in output field.json +1 -0
- package/examples/debug/ensure debug messages are generated.json +1 -1
- package/examples/debug/handle largish json files as content.json +1 -1
- package/examples/debug/status message counter.json +1 -1
- package/examples/debug/type hadling of JSONata results (ered).json +1 -0
- package/examples/debug/type hadling of JSONata results (node-red).json +1 -0
- package/examples/delay/respect the reset flag and dont pass on the reset msg.json +1 -0
- package/examples/exec/handle multiple process at once (ered).json +1 -0
- package/examples/exec/handle multiple process at once (nred).json +1 -0
- package/examples/exec/support timeout specification (ered).json +1 -0
- package/examples/exec/support timeout specification (nred).json +1 -0
- package/examples/exec/synchronised execution (ered).json +1 -0
- package/examples/exec/synchronised execution (nred).json +1 -0
- package/examples/file in/basic functionality of being able to read a file.json +1 -1
- package/examples/file in/will accept file name from msg obj.json +1 -1
- package/examples/filter/ignore initial value.json +1 -1
- package/examples/filter/post if value changed.json +1 -1
- package/examples/flowhubpull/retrieve flow id.json +1 -1
- package/examples/function/divide by zero throws kills node.json +1 -1
- package/examples/function/ensure /"on stop/" code is executed.json" +1 -1
- package/examples/function/function and module work together.json +1 -1
- package/examples/function/handle corrupt code.json +1 -1
- package/examples/function/set node context.json +1 -1
- package/examples/function/support timeout setting.json +1 -1
- package/examples/function/supports completed node.json +1 -1
- package/examples/http/Dynamic Routing.json +1 -1
- package/examples/http/POST & GET have different endpoints.json +1 -1
- package/examples/http/dynamic redirect.json +1 -1
- package/examples/http/have params in the path.json +1 -1
- package/examples/http/http static routing.json +1 -1
- package/examples/http/multiple endpoints don't all get the request.json +1 -1
- package/examples/http/nodes should be able to handle requests.json +1 -1
- package/examples/http/post requests - json content.json +1 -1
- package/examples/http/request parses JSON conent.json +1 -1
- package/examples/http/set content type.json +1 -1
- package/examples/http/support query string on get request.json +1 -1
- package/examples/inject/repeat interval.json +1 -1
- package/examples/inject/trigger after - does not trigger.json +1 -1
- package/examples/inject/unsupported JSONata function.json +1 -1
- package/examples/join/manual config with count & nested property name.json +1 -1
- package/examples/json/parse example json content.json +1 -1
- package/examples/json/raise exception if content not valid.json +1 -1
- package/examples/json/support prettify json content.json +1 -1
- package/examples/link nodes/across flow tabs.json +1 -1
- package/examples/link nodes/cascading link calls.json +1 -1
- package/examples/markdown/allow for inline html.json +1 -1
- package/examples/markdown/convert markdown to html.json +1 -1
- package/examples/markdown/support code block.json +1 -1
- package/examples/mqtt/auto-(re)connect.json +1 -1
- package/examples/range/basic examples.json +1 -1
- package/examples/split/Array type.json +1 -1
- package/examples/split/binary type.json +1 -1
- package/examples/split/work with binary data as string data (ered).json +1 -0
- package/examples/split/work with binary data as string data (nred).json +1 -0
- package/examples/statemachine/exception if no action to perform.json +1 -1
- package/examples/status/basic working version.json +1 -1
- package/examples/status/only one message per status value.json +1 -1
- package/examples/switch/JSONata undefined value & exceptions.json +1 -1
- package/examples/switch/post debug on JSONata exception.json +1 -1
- package/examples/switch/raise exception if JSONata has exception.json +1 -1
- package/examples/tcp/Bad value on output port (3425).json +1 -1
- package/examples/tcp/multiple tcp in connectors (1194).json +1 -1
- package/examples/template/support mustache template.json +1 -1
- package/nodes/ut-assert-debug.js +239 -2
- package/package.json +3 -2
- package/plugins/sidebar.html +79 -13
- package/priv/testdata/helloworld.txt +1 -0
- package/priv/testdata/test.json +126 -0
- package/examples/.core/assert values ignores failures if requested.json +0 -1
- package/examples/debug/handling of Jsonata expressions.json +0 -1
- package/examples/debug/type hadling of JSONata reslults (ered).json +0 -1
- package/examples/debug/type hadling of JSONata reslults (node-red).json +0 -1
- package/examples/exec/handle multiple process at once.json +0 -1
- package/examples/exec/support timeout specification.json +0 -1
- package/examples/exec/synchronised execution.json +0 -1
- package/examples/split/work with binary data as string data.json +0 -1
- /package/examples/comment/{what is there to test?.json → what is there to test-.json} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"id":"51bfa9456b1745c0","type":"tab","label":"[filter] ignore initial value","disabled":false,"info":"## Filter Node - ignore initial value\n\nmode `rbei` with **no** topic grouping","env":[]},{"id":"026f7ba779774f8a","type":"group","z":"51bfa9456b1745c0","name":"initial value of one isn't passed through","style":{"label":true},"nodes":["1c31ccbdd0ca019d","a0ada11602a931be","89545c20cbf6910e","73d7b68a95c8127a","2dbebf5ddc750166","1bf2654f308ef5f8","8b789d2849f4a32c","7ff8c7d31547b09e","26561d0daa7b0eb1","b941869cd2230edd","9c3d3e831642e3f5","9cfe1e03363b727d"],"x":58,"y":83,"w":1130,"h":249.5},{"id":"cb54627a53643afa","type":"group","z":"51bfa9456b1745c0","name":"respect the reset message and allow no data through","style":{"label":true},"nodes":["bef98832a0508b3c","af0b0f776d9b0416","225c36a12a0fb30a","1b4a2f47a4aba8c0","2add4ae8bea26031","d3e04b85690fed3b","1e2808189be13fd4","4c5dfdad9d41f265","be5ff44248ee6058","60300f7772c61018","0c75c5447a6e5902","d249e025b57df26d","957ab635377f6174"],"x":73,"y":380.5,"w":1109.6666259765625,"h":301.5},{"id":"1c31ccbdd0ca019d","type":"rbe","z":"51bfa9456b1745c0","g":"026f7ba779774f8a","name":"","func":"rbei","gap":"","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":748,"y":124,"wires":[["1bf2654f308ef5f8","8b789d2849f4a32c","7ff8c7d31547b09e","26561d0daa7b0eb1"]]},{"id":"a0ada11602a931be","type":"inject","z":"51bfa9456b1745c0","g":"026f7ba779774f8a","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":154,"y":124,"wires":[["1c31ccbdd0ca019d","b941869cd2230edd","9c3d3e831642e3f5","9cfe1e03363b727d"]]},{"id":"89545c20cbf6910e","type":"delay","z":"51bfa9456b1745c0","g":"026f7ba779774f8a","name":"","pauseType":"delay","timeout":"100","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":547,"y":180.5,"wires":[["1c31ccbdd0ca019d"]]},{"id":"73d7b68a95c8127a","type":"delay","z":"51bfa9456b1745c0","g":"026f7ba779774f8a","name":"","pauseType":"delay","timeout":"200","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":567,"y":236,"wires":[["1c31ccbdd0ca019d"]]},{"id":"2dbebf5ddc750166","type":"delay","z":"51bfa9456b1745c0","g":"026f7ba779774f8a","name":"","pauseType":"delay","timeout":"300","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":587,"y":291.5,"wires":[["1c31ccbdd0ca019d"]]},{"id":"1bf2654f308ef5f8","type":"ut-assert-values","z":"51bfa9456b1745c0","g":"026f7ba779774f8a","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"2","tot":"num"}],"x":1052,"y":188,"wires":[[]]},{"id":"8b789d2849f4a32c","type":"ut-assert-values","z":"51bfa9456b1745c0","g":"026f7ba779774f8a","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"3","tot":"num"}],"x":1052,"y":239.5,"wires":[[]]},{"id":"7ff8c7d31547b09e","type":"ut-assert-values","z":"51bfa9456b1745c0","g":"026f7ba779774f8a","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"4","tot":"num"}],"x":1052,"y":291,"wires":[[]]},{"id":"26561d0daa7b0eb1","type":"ut-assert-success","z":"51bfa9456b1745c0","g":"026f7ba779774f8a","name":"","count":"3","x":1043,"y":124,"wires":[]},{"id":"b941869cd2230edd","type":"change","z":"51bfa9456b1745c0","g":"026f7ba779774f8a","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"2","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":366,"y":180.5,"wires":[["89545c20cbf6910e"]]},{"id":"9c3d3e831642e3f5","type":"change","z":"51bfa9456b1745c0","g":"026f7ba779774f8a","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"3","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":354,"y":236,"wires":[["73d7b68a95c8127a"]]},{"id":"9cfe1e03363b727d","type":"change","z":"51bfa9456b1745c0","g":"026f7ba779774f8a","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"4","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":342,"y":291.5,"wires":[["2dbebf5ddc750166"]]},{"id":"bef98832a0508b3c","type":"rbe","z":"51bfa9456b1745c0","g":"cb54627a53643afa","name":"","func":"rbei","gap":"","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":763,"y":421.5,"wires":[["0c75c5447a6e5902","d249e025b57df26d","957ab635377f6174"]]},{"id":"af0b0f776d9b0416","type":"inject","z":"51bfa9456b1745c0","g":"cb54627a53643afa","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":169,"y":421.5,"wires":[["bef98832a0508b3c","d3e04b85690fed3b","1e2808189be13fd4","4c5dfdad9d41f265","60300f7772c61018"]]},{"id":"225c36a12a0fb30a","type":"delay","z":"51bfa9456b1745c0","g":"cb54627a53643afa","name":"","pauseType":"delay","timeout":"100","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":562,"y":477.5,"wires":[["bef98832a0508b3c"]]},{"id":"1b4a2f47a4aba8c0","type":"delay","z":"51bfa9456b1745c0","g":"cb54627a53643afa","name":"","pauseType":"delay","timeout":"200","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":590.6666666666666,"y":532,"wires":[["bef98832a0508b3c"]]},{"id":"2add4ae8bea26031","type":"delay","z":"51bfa9456b1745c0","g":"cb54627a53643afa","name":"","pauseType":"delay","timeout":"300","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":619.333333333333,"y":586.5,"wires":[["bef98832a0508b3c"]]},{"id":"d3e04b85690fed3b","type":"change","z":"51bfa9456b1745c0","g":"cb54627a53643afa","name":"","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":381,"y":477.5,"wires":[["225c36a12a0fb30a"]]},{"id":"1e2808189be13fd4","type":"change","z":"51bfa9456b1745c0","g":"cb54627a53643afa","name":"","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":356.33333333333326,"y":532,"wires":[["1b4a2f47a4aba8c0"]]},{"id":"4c5dfdad9d41f265","type":"change","z":"51bfa9456b1745c0","g":"cb54627a53643afa","name":"","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":331.66666666666663,"y":586.5,"wires":[["2add4ae8bea26031"]]},{"id":"be5ff44248ee6058","type":"delay","z":"51bfa9456b1745c0","g":"cb54627a53643afa","name":"","pauseType":"delay","timeout":"400","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":648,"y":641,"wires":[["bef98832a0508b3c"]]},{"id":"60300f7772c61018","type":"change","z":"51bfa9456b1745c0","g":"cb54627a53643afa","name":"payload = 2","rules":[{"t":"set","p":"payload","pt":"msg","to":"2","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":317,"y":641,"wires":[["be5ff44248ee6058"]]},{"id":"0c75c5447a6e5902","type":"ut-assert-success","z":"51bfa9456b1745c0","g":"cb54627a53643afa","name":"","count":"2","x":1038,"y":421.5,"wires":[]},{"id":"d249e025b57df26d","type":"ut-assert-values","z":"51bfa9456b1745c0","g":"cb54627a53643afa","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"2","tot":"num"}],"x":1011,"y":485,"wires":[[]]},{"id":"957ab635377f6174","type":"ut-assert-values","z":"51bfa9456b1745c0","g":"cb54627a53643afa","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"noteql","p":"reset","pt":"msg","to":"true","tot":"bool"}],"x":1036.6666259765625,"y":593.8888244628906,"wires":[[]]}]
|
|
1
|
+
[{"id":"51bfa9456b1745c0","type":"tab","label":"[filter] ignore initial value","disabled":false,"info":"## Filter Node - ignore initial value\n\nmode `rbei` with **no** topic grouping\n\nIgnore initial value seems to be mean that the initial value is **always** ignored and only if something changes does the msg get through.","env":[{"name":"NRED_TIMEOUT","value":"6","type":"num"},{"name":"ERED_PENDING","value":"true","type":"bool"}]},{"id":"026f7ba779774f8a","type":"group","z":"51bfa9456b1745c0","name":"initial value of one isn't passed through","style":{"label":true},"nodes":["1c31ccbdd0ca019d","a0ada11602a931be","89545c20cbf6910e","73d7b68a95c8127a","2dbebf5ddc750166","1bf2654f308ef5f8","8b789d2849f4a32c","7ff8c7d31547b09e","26561d0daa7b0eb1","b941869cd2230edd","9c3d3e831642e3f5","9cfe1e03363b727d"],"x":58,"y":83,"w":1130,"h":249.5},{"id":"cb54627a53643afa","type":"group","z":"51bfa9456b1745c0","name":"respect the reset message and allow no data through","style":{"label":true},"nodes":["bef98832a0508b3c","af0b0f776d9b0416","225c36a12a0fb30a","1b4a2f47a4aba8c0","2add4ae8bea26031","d3e04b85690fed3b","4c5dfdad9d41f265","be5ff44248ee6058","60300f7772c61018","0c75c5447a6e5902","d249e025b57df26d","957ab635377f6174","9257037c4b368cff"],"x":73,"y":380.5,"w":1109.6666259765625,"h":301.5},{"id":"2e6137a4e2f31ba0","type":"group","z":"51bfa9456b1745c0","name":"ignore the reset message and allow no data through - the value of '1' is ignored because it was the initial value, even after reset","style":{"label":true},"nodes":["32b1bb40a32514b1","beac50ab3955f6c8","9a05a4ca94dcd297","ab32a19a909a9bc0","252d32a6e67bb44a","d7d4c61325feae50","130ad6d9116381ee","67adbc0593538aac","ec18bec9f68a5d3f","91dda99edcd99dd7","022d4a59935a280e","33939e5957bdc92b","c694eec195ace9fe","d1e3066f6adcfe6a","f465647ffd51e2cc","e1092baceb73ea67","3b6150c538be14dd","44a8e218872d9fc1","35311ac3d01a8d7a","39c2baaccaf04f23","4b194b18b3b00640"],"x":69.4444580078125,"y":752.8888120651245,"w":1508.5554962158203,"h":607.0001764297485},{"id":"1c31ccbdd0ca019d","type":"rbe","z":"51bfa9456b1745c0","g":"026f7ba779774f8a","name":"","func":"rbei","gap":"","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":748,"y":124,"wires":[["1bf2654f308ef5f8","8b789d2849f4a32c","7ff8c7d31547b09e","26561d0daa7b0eb1"]]},{"id":"a0ada11602a931be","type":"inject","z":"51bfa9456b1745c0","g":"026f7ba779774f8a","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":154,"y":124,"wires":[["1c31ccbdd0ca019d","b941869cd2230edd","9c3d3e831642e3f5","9cfe1e03363b727d"]]},{"id":"89545c20cbf6910e","type":"delay","z":"51bfa9456b1745c0","g":"026f7ba779774f8a","name":"","pauseType":"delay","timeout":"100","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":547,"y":180.5,"wires":[["1c31ccbdd0ca019d"]]},{"id":"73d7b68a95c8127a","type":"delay","z":"51bfa9456b1745c0","g":"026f7ba779774f8a","name":"","pauseType":"delay","timeout":"200","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":567,"y":236,"wires":[["1c31ccbdd0ca019d"]]},{"id":"2dbebf5ddc750166","type":"delay","z":"51bfa9456b1745c0","g":"026f7ba779774f8a","name":"","pauseType":"delay","timeout":"300","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":587,"y":291.5,"wires":[["1c31ccbdd0ca019d"]]},{"id":"1bf2654f308ef5f8","type":"ut-assert-values","z":"51bfa9456b1745c0","g":"026f7ba779774f8a","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"2","tot":"num"}],"x":1052,"y":188,"wires":[[]]},{"id":"8b789d2849f4a32c","type":"ut-assert-values","z":"51bfa9456b1745c0","g":"026f7ba779774f8a","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"3","tot":"num"}],"x":1052,"y":239.5,"wires":[[]]},{"id":"7ff8c7d31547b09e","type":"ut-assert-values","z":"51bfa9456b1745c0","g":"026f7ba779774f8a","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"4","tot":"num"}],"x":1052,"y":291,"wires":[[]]},{"id":"26561d0daa7b0eb1","type":"ut-assert-success","z":"51bfa9456b1745c0","g":"026f7ba779774f8a","name":"","msglimit":"==","count":"3","x":1043,"y":124,"wires":[]},{"id":"b941869cd2230edd","type":"change","z":"51bfa9456b1745c0","g":"026f7ba779774f8a","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"2","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":366,"y":180.5,"wires":[["89545c20cbf6910e"]]},{"id":"9c3d3e831642e3f5","type":"change","z":"51bfa9456b1745c0","g":"026f7ba779774f8a","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"3","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":354,"y":236,"wires":[["73d7b68a95c8127a"]]},{"id":"9cfe1e03363b727d","type":"change","z":"51bfa9456b1745c0","g":"026f7ba779774f8a","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"4","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":342,"y":291.5,"wires":[["2dbebf5ddc750166"]]},{"id":"bef98832a0508b3c","type":"rbe","z":"51bfa9456b1745c0","g":"cb54627a53643afa","name":"","func":"rbei","gap":"","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":763,"y":421.5,"wires":[["0c75c5447a6e5902","d249e025b57df26d","957ab635377f6174"]]},{"id":"af0b0f776d9b0416","type":"inject","z":"51bfa9456b1745c0","g":"cb54627a53643afa","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":169,"y":421.5,"wires":[["bef98832a0508b3c","d3e04b85690fed3b","4c5dfdad9d41f265","60300f7772c61018","1b4a2f47a4aba8c0"]]},{"id":"225c36a12a0fb30a","type":"delay","z":"51bfa9456b1745c0","g":"cb54627a53643afa","name":"","pauseType":"delay","timeout":"200","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":562,"y":477.5,"wires":[["bef98832a0508b3c"]]},{"id":"1b4a2f47a4aba8c0","type":"delay","z":"51bfa9456b1745c0","g":"cb54627a53643afa","name":"","pauseType":"delay","timeout":"400","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":351.77770233154297,"y":528.2222318649292,"wires":[["9257037c4b368cff"]]},{"id":"2add4ae8bea26031","type":"delay","z":"51bfa9456b1745c0","g":"cb54627a53643afa","name":"","pauseType":"delay","timeout":"600","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":619.333333333333,"y":586.5,"wires":[["bef98832a0508b3c"]]},{"id":"d3e04b85690fed3b","type":"change","z":"51bfa9456b1745c0","g":"cb54627a53643afa","name":"","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":381,"y":477.5,"wires":[["225c36a12a0fb30a"]]},{"id":"4c5dfdad9d41f265","type":"change","z":"51bfa9456b1745c0","g":"cb54627a53643afa","name":"","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":331.66666666666663,"y":586.5,"wires":[["2add4ae8bea26031"]]},{"id":"be5ff44248ee6058","type":"delay","z":"51bfa9456b1745c0","g":"cb54627a53643afa","name":"","pauseType":"delay","timeout":"800","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":648,"y":641,"wires":[["bef98832a0508b3c"]]},{"id":"60300f7772c61018","type":"change","z":"51bfa9456b1745c0","g":"cb54627a53643afa","name":"payload = 2","rules":[{"t":"set","p":"payload","pt":"msg","to":"2","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":297,"y":641,"wires":[["be5ff44248ee6058"]]},{"id":"0c75c5447a6e5902","type":"ut-assert-success","z":"51bfa9456b1745c0","g":"cb54627a53643afa","name":"","msglimit":"==","count":"1","x":1038,"y":421.5,"wires":[]},{"id":"d249e025b57df26d","type":"ut-assert-values","z":"51bfa9456b1745c0","g":"cb54627a53643afa","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"2","tot":"num"}],"x":1011,"y":485,"wires":[[]]},{"id":"957ab635377f6174","type":"ut-assert-values","z":"51bfa9456b1745c0","g":"cb54627a53643afa","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"noteql","p":"reset","pt":"msg","to":"true","tot":"bool"}],"x":1036.6666259765625,"y":593.8888244628906,"wires":[[]]},{"id":"9257037c4b368cff","type":"change","z":"51bfa9456b1745c0","g":"cb54627a53643afa","name":"","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":584.4444580078125,"y":528.2222318649292,"wires":[["bef98832a0508b3c"]]},{"id":"32b1bb40a32514b1","type":"rbe","z":"51bfa9456b1745c0","g":"2e6137a4e2f31ba0","name":"","func":"rbei","gap":"","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":1158.3333282470703,"y":793.8888120651245,"wires":[["91dda99edcd99dd7","022d4a59935a280e","33939e5957bdc92b"]]},{"id":"beac50ab3955f6c8","type":"inject","z":"51bfa9456b1745c0","g":"2e6137a4e2f31ba0","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":165.4444580078125,"y":793.8888120651245,"wires":[["32b1bb40a32514b1","d7d4c61325feae50","130ad6d9116381ee","ec18bec9f68a5d3f","ab32a19a909a9bc0","f465647ffd51e2cc","3b6150c538be14dd","44a8e218872d9fc1","4b194b18b3b00640"]]},{"id":"9a05a4ca94dcd297","type":"delay","z":"51bfa9456b1745c0","g":"2e6137a4e2f31ba0","name":"","pauseType":"delay","timeout":"200","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":760.6667251586914,"y":850.4444046020508,"wires":[["32b1bb40a32514b1"]]},{"id":"ab32a19a909a9bc0","type":"delay","z":"51bfa9456b1745c0","g":"2e6137a4e2f31ba0","name":"","pauseType":"delay","timeout":"400","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":550.4444274902344,"y":909.6888711929321,"wires":[["c694eec195ace9fe"]]},{"id":"252d32a6e67bb44a","type":"delay","z":"51bfa9456b1745c0","g":"2e6137a4e2f31ba0","name":"","pauseType":"delay","timeout":"600","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":818.0000584920244,"y":967.1555591583251,"wires":[["32b1bb40a32514b1"]]},{"id":"d7d4c61325feae50","type":"change","z":"51bfa9456b1745c0","g":"2e6137a4e2f31ba0","name":"","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":579.6667251586914,"y":850.4444046020508,"wires":[["9a05a4ca94dcd297"]]},{"id":"130ad6d9116381ee","type":"change","z":"51bfa9456b1745c0","g":"2e6137a4e2f31ba0","name":"","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":530.333391825358,"y":968.9333377838134,"wires":[["252d32a6e67bb44a"]]},{"id":"67adbc0593538aac","type":"delay","z":"51bfa9456b1745c0","g":"2e6137a4e2f31ba0","name":"","pauseType":"delay","timeout":"800","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":846.6667251586914,"y":1025.5111364364623,"wires":[["32b1bb40a32514b1"]]},{"id":"ec18bec9f68a5d3f","type":"change","z":"51bfa9456b1745c0","g":"2e6137a4e2f31ba0","name":"payload = 2","rules":[{"t":"set","p":"payload","pt":"msg","to":"2","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":495.6667251586914,"y":1028.1778043746947,"wires":[["67adbc0593538aac"]]},{"id":"91dda99edcd99dd7","type":"ut-assert-success","z":"51bfa9456b1745c0","g":"2e6137a4e2f31ba0","name":"","msglimit":"==","count":"4","x":1433.3333282470703,"y":793.8888120651245,"wires":[]},{"id":"022d4a59935a280e","type":"ut-assert-values","z":"51bfa9456b1745c0","g":"2e6137a4e2f31ba0","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"2","tot":"num"}],"x":1406.3333282470703,"y":854.6109981536865,"wires":[[]]},{"id":"33939e5957bdc92b","type":"ut-assert-values","z":"51bfa9456b1745c0","g":"2e6137a4e2f31ba0","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"noteql","p":"reset","pt":"msg","to":"true","tot":"bool"}],"x":1431.9999542236328,"y":963.4998226165771,"wires":[[]]},{"id":"c694eec195ace9fe","type":"change","z":"51bfa9456b1745c0","g":"2e6137a4e2f31ba0","name":"","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":783.1111831665039,"y":908.7999818801879,"wires":[["32b1bb40a32514b1"]]},{"id":"d1e3066f6adcfe6a","type":"delay","z":"51bfa9456b1745c0","g":"2e6137a4e2f31ba0","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":921.1111679077148,"y":1083.8667137145994,"wires":[["32b1bb40a32514b1"]]},{"id":"f465647ffd51e2cc","type":"change","z":"51bfa9456b1745c0","g":"2e6137a4e2f31ba0","name":"payload = 1","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":457.88880920410156,"y":1087.422270965576,"wires":[["d1e3066f6adcfe6a"]]},{"id":"e1092baceb73ea67","type":"delay","z":"51bfa9456b1745c0","g":"2e6137a4e2f31ba0","name":"","pauseType":"delay","timeout":"1111","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":978.8889083862305,"y":1142.2222909927368,"wires":[["32b1bb40a32514b1"]]},{"id":"3b6150c538be14dd","type":"change","z":"51bfa9456b1745c0","g":"2e6137a4e2f31ba0","name":"payload = 1","rules":[{"t":"set","p":"payload","pt":"msg","to":"2","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":424.5554885864258,"y":1146.6667375564575,"wires":[["e1092baceb73ea67"]]},{"id":"44a8e218872d9fc1","type":"delay","z":"51bfa9456b1745c0","g":"2e6137a4e2f31ba0","name":"","pauseType":"delay","timeout":"1400","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":568.8888931274414,"y":1208.888991355896,"wires":[["35311ac3d01a8d7a"]]},{"id":"35311ac3d01a8d7a","type":"change","z":"51bfa9456b1745c0","g":"2e6137a4e2f31ba0","name":"","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":791.5556488037109,"y":1208.888991355896,"wires":[["32b1bb40a32514b1"]]},{"id":"39c2baaccaf04f23","type":"delay","z":"51bfa9456b1745c0","g":"2e6137a4e2f31ba0","name":"","pauseType":"delay","timeout":"1600","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":997.7778015136719,"y":1314.4445419311523,"wires":[["32b1bb40a32514b1"]]},{"id":"4b194b18b3b00640","type":"change","z":"51bfa9456b1745c0","g":"2e6137a4e2f31ba0","name":"payload = 1","rules":[{"t":"set","p":"payload","pt":"msg","to":"2","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":383.4443817138672,"y":1318.888988494873,"wires":[["39c2baaccaf04f23"]]}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"id":"f19fdae0c02b4f03","type":"tab","label":"[filter] post if value changed","disabled":false,"info":"## Filter Node - block unless value changes\n\n`rbe` mode with no topic\n\nrbe = Report by Exception \n\n","env":[{"name":"ERED_PENDING","value":"false","type":"bool"},{"name":"NRED_TIMEOUT","value":"10","type":"num"}]},{"id":"1fad26711775a40e","type":"group","z":"f19fdae0c02b4f03","name":"property name is payload","style":{"label":true},"nodes":["ba56e9576baa4861","9d20155046acc31d","8543499ae5fd3576","6bebc590dadbb889","91dc380dc998eb73","4a2e2509bb56578c","de9e7db23aa445d4","4ad5428bb1c2b43b","3a69a6eab42aa620"],"x":74.71431732177734,"y":169.25000762939453,"w":1501,"h":388.82148456573486},{"id":"bcbd77613b58fd14","type":"group","z":"f19fdae0c02b4f03","name":"property name is 'fubar'","style":{"label":true},"nodes":["93d6c55ad6d1226d","6a895b8bf87276db","59dce407eef8cca0","1d0568738eeca121","1b6070bfb3872cb0","48147307210ff02d","e55e7353f2bac7d8","0ca2a03e246542f6","5104a3873348939b"],"x":83.2857666015625,"y":617.9464721679688,"w":1501,"h":370.2500686645508},{"id":"fd7e9b5411af529a","type":"group","z":"f19fdae0c02b4f03","name":"initial value of one is passed through","style":{"label":true},"nodes":["efe7ba3be4543696","67ab18c23e6c587b","0b44e89a334f0d8a","db5d759eb00cc309","cf9d3c1218efdb76","bc46ed8ef3228081","ac89fbae93406c6b","0766942615326863","562c17db94814a4d","a97de0b6702f0df0","477a74766db49b18","fa0885e500e36329","70cbcae5d6ecbd90"],"x":82,"y":1100,"w":1130,"h":281},{"id":"5a6888198548f8a1","type":"group","z":"f19fdae0c02b4f03","name":"respect reset message and allow the payload of 1 to go through twice","style":{"label":true},"nodes":["7f05cc05bd28ba55","077dab67f1b3e189","7f756373695c6370","01f9ade51488b89b","932d64cad9078ef8","96d8d76f33ea1497","d153932e2569b829","5580785faab157d1","81db7508d0f3aeb5","4fbd1b0bdd4d239b"],"x":75,"y":1545,"w":1130,"h":249.5},{"id":"ba56e9576baa4861","type":"rbe","z":"f19fdae0c02b4f03","g":"1fad26711775a40e","name":"","func":"rbe","gap":"10%","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":1035.7143173217773,"y":429.87500762939453,"wires":[["91dc380dc998eb73","de9e7db23aa445d4","4ad5428bb1c2b43b"]]},{"id":"9d20155046acc31d","type":"inject","z":"f19fdae0c02b4f03","g":"1fad26711775a40e","name":"","props":[{"p":"counter","v":"0","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":170.71431732177734,"y":429.87500762939453,"wires":[["8543499ae5fd3576"]]},{"id":"8543499ae5fd3576","type":"change","z":"f19fdae0c02b4f03","g":"1fad26711775a40e","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"10","tot":"num"},{"t":"set","p":"counter","pt":"msg","to":"$$.counter + 1","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":616.7143173217773,"y":429.87500762939453,"wires":[["6bebc590dadbb889","ba56e9576baa4861","3a69a6eab42aa620"]]},{"id":"6bebc590dadbb889","type":"switch","z":"f19fdae0c02b4f03","g":"1fad26711775a40e","name":"limit to 1000 messages","property":"counter","propertyType":"msg","rules":[{"t":"lt","v":"1000","vt":"num"},{"t":"else"}],"checkall":"false","repair":false,"outputs":2,"x":616.7143173217773,"y":210.25000762939453,"wires":[["8543499ae5fd3576"],["4a2e2509bb56578c"]]},{"id":"91dc380dc998eb73","type":"ut-assert-success","z":"f19fdae0c02b4f03","g":"1fad26711775a40e","name":"","count":"2","x":1459.7143173217773,"y":429.87500762939453,"wires":[]},{"id":"4a2e2509bb56578c","type":"change","z":"f19fdae0c02b4f03","g":"1fad26711775a40e","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"11","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":855.7143249511719,"y":316.8572082519531,"wires":[["ba56e9576baa4861"]]},{"id":"de9e7db23aa445d4","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"1fad26711775a40e","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"10","tot":"num"}],"x":1266.7143173217773,"y":316.8572082519531,"wires":[[]]},{"id":"4ad5428bb1c2b43b","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"1fad26711775a40e","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"11","tot":"num"}],"x":1368.2143173217773,"y":373.3661079406738,"wires":[[]]},{"id":"3a69a6eab42aa620","type":"ut-assert-success","z":"f19fdae0c02b4f03","g":"1fad26711775a40e","name":"","count":"1000","x":953.5714263916016,"y":517.0714921951294,"wires":[]},{"id":"93d6c55ad6d1226d","type":"rbe","z":"f19fdae0c02b4f03","g":"bcbd77613b58fd14","name":"","func":"rbe","gap":"10%","start":"","inout":"out","septopics":false,"property":"fubar","topi":"topic","x":1044.2857666015625,"y":878.5714721679688,"wires":[["1b6070bfb3872cb0","e55e7353f2bac7d8","0ca2a03e246542f6"]]},{"id":"6a895b8bf87276db","type":"inject","z":"f19fdae0c02b4f03","g":"bcbd77613b58fd14","name":"","props":[{"p":"counter","v":"0","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":179.2857666015625,"y":878.5714721679688,"wires":[["59dce407eef8cca0"]]},{"id":"59dce407eef8cca0","type":"change","z":"f19fdae0c02b4f03","g":"bcbd77613b58fd14","name":"","rules":[{"t":"set","p":"fubar","pt":"msg","to":"10","tot":"num"},{"t":"set","p":"counter","pt":"msg","to":"$$.counter + 1","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":625.2857666015625,"y":878.5714721679688,"wires":[["1d0568738eeca121","93d6c55ad6d1226d","5104a3873348939b"]]},{"id":"1d0568738eeca121","type":"switch","z":"f19fdae0c02b4f03","g":"bcbd77613b58fd14","name":"limit to 1000 messages","property":"counter","propertyType":"msg","rules":[{"t":"lt","v":"1000","vt":"num"},{"t":"else"}],"checkall":"false","repair":false,"outputs":2,"x":625.2857666015625,"y":658.9464721679688,"wires":[["59dce407eef8cca0"],["48147307210ff02d"]]},{"id":"1b6070bfb3872cb0","type":"ut-assert-success","z":"f19fdae0c02b4f03","g":"bcbd77613b58fd14","name":"","count":"2","x":1468.2857666015625,"y":878.5714721679688,"wires":[]},{"id":"48147307210ff02d","type":"change","z":"f19fdae0c02b4f03","g":"bcbd77613b58fd14","name":"","rules":[{"t":"set","p":"fubar","pt":"msg","to":"11","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":864.285774230957,"y":765.5536727905273,"wires":[["93d6c55ad6d1226d"]]},{"id":"e55e7353f2bac7d8","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"bcbd77613b58fd14","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"fubar","pt":"msg","to":"10","tot":"num"}],"x":1265.2857666015625,"y":765.5536727905273,"wires":[[]]},{"id":"0ca2a03e246542f6","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"bcbd77613b58fd14","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"fubar","pt":"msg","to":"11","tot":"num"}],"x":1366.7857666015625,"y":822.062572479248,"wires":[[]]},{"id":"5104a3873348939b","type":"ut-assert-success","z":"f19fdae0c02b4f03","g":"bcbd77613b58fd14","name":"","count":"1000","x":939.2857437133789,"y":947.1965408325195,"wires":[]},{"id":"efe7ba3be4543696","type":"rbe","z":"f19fdae0c02b4f03","g":"fd7e9b5411af529a","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":772,"y":1141,"wires":[["bc46ed8ef3228081","ac89fbae93406c6b","0766942615326863","562c17db94814a4d","70cbcae5d6ecbd90"]]},{"id":"67ab18c23e6c587b","type":"inject","z":"f19fdae0c02b4f03","g":"fd7e9b5411af529a","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":178,"y":1141,"wires":[["efe7ba3be4543696","a97de0b6702f0df0","477a74766db49b18","fa0885e500e36329"]]},{"id":"0b44e89a334f0d8a","type":"delay","z":"f19fdae0c02b4f03","g":"fd7e9b5411af529a","name":"","pauseType":"delay","timeout":"100","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":571,"y":1197.5,"wires":[["efe7ba3be4543696"]]},{"id":"db5d759eb00cc309","type":"delay","z":"f19fdae0c02b4f03","g":"fd7e9b5411af529a","name":"","pauseType":"delay","timeout":"200","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":576,"y":1249.5,"wires":[["efe7ba3be4543696"]]},{"id":"cf9d3c1218efdb76","type":"delay","z":"f19fdae0c02b4f03","g":"fd7e9b5411af529a","name":"","pauseType":"delay","timeout":"300","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":611,"y":1308.5,"wires":[["efe7ba3be4543696"]]},{"id":"bc46ed8ef3228081","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"fd7e9b5411af529a","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"2","tot":"num"}],"x":1076,"y":1237,"wires":[[]]},{"id":"ac89fbae93406c6b","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"fd7e9b5411af529a","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"3","tot":"num"}],"x":1076,"y":1288.5,"wires":[[]]},{"id":"0766942615326863","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"fd7e9b5411af529a","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"4","tot":"num"}],"x":1076,"y":1340,"wires":[[]]},{"id":"562c17db94814a4d","type":"ut-assert-success","z":"f19fdae0c02b4f03","g":"fd7e9b5411af529a","name":"","count":"4","x":1067,"y":1141,"wires":[]},{"id":"a97de0b6702f0df0","type":"change","z":"f19fdae0c02b4f03","g":"fd7e9b5411af529a","name":"payload = 2","rules":[{"t":"set","p":"payload","pt":"msg","to":"2","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":1197.5,"wires":[["0b44e89a334f0d8a"]]},{"id":"477a74766db49b18","type":"change","z":"f19fdae0c02b4f03","g":"fd7e9b5411af529a","name":"payload = 3 ","rules":[{"t":"set","p":"payload","pt":"msg","to":"3","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":374,"y":1249.5,"wires":[["db5d759eb00cc309"]]},{"id":"fa0885e500e36329","type":"change","z":"f19fdae0c02b4f03","g":"fd7e9b5411af529a","name":"payload = 4","rules":[{"t":"set","p":"payload","pt":"msg","to":"4","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":356,"y":1308.5,"wires":[["cf9d3c1218efdb76"]]},{"id":"70cbcae5d6ecbd90","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"fd7e9b5411af529a","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"1","tot":"num"}],"x":1076,"y":1186,"wires":[[]]},{"id":"7f05cc05bd28ba55","type":"rbe","z":"f19fdae0c02b4f03","g":"5a6888198548f8a1","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":765,"y":1586,"wires":[["96d8d76f33ea1497","4fbd1b0bdd4d239b"]]},{"id":"077dab67f1b3e189","type":"inject","z":"f19fdae0c02b4f03","g":"5a6888198548f8a1","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":171,"y":1586,"wires":[["7f05cc05bd28ba55","d153932e2569b829","5580785faab157d1","81db7508d0f3aeb5"]]},{"id":"7f756373695c6370","type":"delay","z":"f19fdae0c02b4f03","g":"5a6888198548f8a1","name":"","pauseType":"delay","timeout":"100","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":564,"y":1642.5,"wires":[["7f05cc05bd28ba55"]]},{"id":"01f9ade51488b89b","type":"delay","z":"f19fdae0c02b4f03","g":"5a6888198548f8a1","name":"","pauseType":"delay","timeout":"200","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":584,"y":1698,"wires":[["7f05cc05bd28ba55"]]},{"id":"932d64cad9078ef8","type":"delay","z":"f19fdae0c02b4f03","g":"5a6888198548f8a1","name":"","pauseType":"delay","timeout":"300","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":604,"y":1753.5,"wires":[["7f05cc05bd28ba55"]]},{"id":"96d8d76f33ea1497","type":"ut-assert-success","z":"f19fdae0c02b4f03","g":"5a6888198548f8a1","name":"","count":"3","x":1060,"y":1586,"wires":[]},{"id":"d153932e2569b829","type":"change","z":"f19fdae0c02b4f03","g":"5a6888198548f8a1","name":"","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":383,"y":1642.5,"wires":[["7f756373695c6370"]]},{"id":"5580785faab157d1","type":"change","z":"f19fdae0c02b4f03","g":"5a6888198548f8a1","name":"","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":371,"y":1698,"wires":[["01f9ade51488b89b"]]},{"id":"81db7508d0f3aeb5","type":"change","z":"f19fdae0c02b4f03","g":"5a6888198548f8a1","name":"","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":359,"y":1753.5,"wires":[["932d64cad9078ef8"]]},{"id":"4fbd1b0bdd4d239b","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"5a6888198548f8a1","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"1","tot":"num"}],"x":1069,"y":1634,"wires":[[]]}]
|
|
1
|
+
[{"id":"f19fdae0c02b4f03","type":"tab","label":"[filter] post if value changed","disabled":false,"info":"## Filter Node - block unless value changes\n\n`rbe` mode with no topic\n\nrbe = Report by Exception \n\n## More test cases\n\nThere are more tests to be had:\n\n- initial message is a reset message\n - with payload\n - without payload\n\n","env":[{"name":"ERED_PENDING","value":"false","type":"bool"},{"name":"NRED_TIMEOUT","value":"10","type":"num"}]},{"id":"1fad26711775a40e","type":"group","z":"f19fdae0c02b4f03","name":"property name is payload","style":{"label":true},"nodes":["ba56e9576baa4861","9d20155046acc31d","8543499ae5fd3576","6bebc590dadbb889","91dc380dc998eb73","4a2e2509bb56578c","de9e7db23aa445d4","4ad5428bb1c2b43b","3a69a6eab42aa620"],"x":74.71431732177734,"y":169.25000762939453,"w":1501,"h":388.82148456573486},{"id":"bcbd77613b58fd14","type":"group","z":"f19fdae0c02b4f03","name":"property name is 'fubar'","style":{"label":true},"nodes":["93d6c55ad6d1226d","6a895b8bf87276db","59dce407eef8cca0","1d0568738eeca121","1b6070bfb3872cb0","48147307210ff02d","e55e7353f2bac7d8","0ca2a03e246542f6","5104a3873348939b"],"x":83.2857666015625,"y":617.9464721679688,"w":1501,"h":370.2500686645508},{"id":"fd7e9b5411af529a","type":"group","z":"f19fdae0c02b4f03","name":"initial value of one is passed through","style":{"label":true},"nodes":["efe7ba3be4543696","67ab18c23e6c587b","0b44e89a334f0d8a","db5d759eb00cc309","cf9d3c1218efdb76","bc46ed8ef3228081","ac89fbae93406c6b","0766942615326863","562c17db94814a4d","a97de0b6702f0df0","477a74766db49b18","fa0885e500e36329","70cbcae5d6ecbd90"],"x":82,"y":1100,"w":1130,"h":281},{"id":"5a6888198548f8a1","type":"group","z":"f19fdae0c02b4f03","name":"reset message carries no payload value, payload is 1 twice as subsequent message after reset is sent through","style":{"label":true},"nodes":["7f05cc05bd28ba55","077dab67f1b3e189","7f756373695c6370","01f9ade51488b89b","932d64cad9078ef8","96d8d76f33ea1497","d153932e2569b829","81db7508d0f3aeb5","4fbd1b0bdd4d239b","3c2936242e3e2197","623142d62c346a6d"],"x":312,"y":1434,"w":1130,"h":249.5,"info":"Note: The delay node also accepts the `msg.reset` flag so the setting of that flag has to happen after the delay - which wasn't the case before.\n"},{"id":"092da56d4fc7ede2","type":"group","z":"f19fdae0c02b4f03","name":"reset message also has a payload with the same value as the initial value, only the reset message and the initial message go through","style":{"label":true},"nodes":["02fc55a36c40a947","86a313fe6909822f","16c6e5df668cfaa5","2cdadb27c4b1ac57","59b58ece613dd2ae","fae6e45348541c43","93c1e98a446de545","5ea3dfd575e08333","38ac3f21aadabc47","bc564a8cfb91a4c3","edc50f0873a61a11"],"x":309,"y":1707,"w":1130,"h":249.5,"info":"Note: The delay node also accepts the `msg.reset` flag so the setting of that flag has to happen after the delay - which wasn't the case before.\n"},{"id":"a3a026c062320c8a","type":"group","z":"f19fdae0c02b4f03","name":"reset message also has a payload with a value different to the initial value, reset message goes through and the subsequent message as it has a different value","style":{"label":true},"nodes":["1a3197b267034b2c","b3bce9bfa78aa434","4297bf467c2011a9","12684a01439a597e","18f44fa2be405d8e","e5aaf1cd293ba857","c6d120f72ee51aa6","4f28a47062a337c9","1c9e26aa6c0955f4","9366e15d3d4a8c5f","7a7ef9f42a37146f","0fc9d9b4a1ab06e3"],"x":307,"y":1982,"w":1128,"h":249.5,"info":"Note: The delay node also accepts the `msg.reset` flag so the setting of that flag has to happen after the delay - which wasn't the case before.\n"},{"id":"1ddf8af78834dbe6","type":"group","z":"f19fdae0c02b4f03","name":"reset message has payload of 2 and the subsequent message also, so it's not passed through","style":{"label":true},"nodes":["2fffbe7ec823c205","f733c08f2aa8412f","5eb1373d510ad013","c9c02cf85d9686e6","66576bba148d46d8","42554d60d038523a","e9fc94a94594fe0a","0f198067e9b65697","9526163eeb8f0fca","7a2086b973140eb2","18d95c0b2ebf07b5","c75b73c5d9862969"],"x":296,"y":2299,"w":1128,"h":253,"info":"Note: The delay node also accepts the `msg.reset` flag so the setting of that flag has to happen after the delay - which wasn't the case before.\n"},{"id":"d60898375c22ed1b","type":"group","z":"f19fdae0c02b4f03","name":"subsequent message after reset has different value and goes through","style":{"label":true},"nodes":["8f60e7d8adf7d125","ea4608cab97ce1d1","72dc1879f1f4d898","3bdd95af7f84d9fd","04f37c8f3dea1457","1390a5bb66913d7f","287496ac14c32e27","82dff00f04f07d69","d2a5d53a1912825c","5d46132c6cb2c629","5aad16a5af063f9a","9f80bcadd23308cf"],"x":1512,"y":1706,"w":1130,"h":252,"info":"Note: The delay node also accepts the `msg.reset` flag so the setting of that flag has to happen after the delay - which wasn't the case before.\n"},{"id":"ba56e9576baa4861","type":"rbe","z":"f19fdae0c02b4f03","g":"1fad26711775a40e","name":"","func":"rbe","gap":"10%","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":1035.7143173217773,"y":429.87500762939453,"wires":[["91dc380dc998eb73","de9e7db23aa445d4","4ad5428bb1c2b43b"]]},{"id":"9d20155046acc31d","type":"inject","z":"f19fdae0c02b4f03","g":"1fad26711775a40e","name":"","props":[{"p":"counter","v":"0","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":170.71431732177734,"y":429.87500762939453,"wires":[["8543499ae5fd3576"]]},{"id":"8543499ae5fd3576","type":"change","z":"f19fdae0c02b4f03","g":"1fad26711775a40e","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"10","tot":"num"},{"t":"set","p":"counter","pt":"msg","to":"$$.counter + 1","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":616.7143173217773,"y":429.87500762939453,"wires":[["6bebc590dadbb889","ba56e9576baa4861","3a69a6eab42aa620"]]},{"id":"6bebc590dadbb889","type":"switch","z":"f19fdae0c02b4f03","g":"1fad26711775a40e","name":"limit to 1000 messages","property":"counter","propertyType":"msg","rules":[{"t":"lt","v":"1000","vt":"num"},{"t":"else"}],"checkall":"false","repair":false,"outputs":2,"x":616.7143173217773,"y":210.25000762939453,"wires":[["8543499ae5fd3576"],["4a2e2509bb56578c"]]},{"id":"91dc380dc998eb73","type":"ut-assert-success","z":"f19fdae0c02b4f03","g":"1fad26711775a40e","name":"","count":"2","x":1459.7143173217773,"y":429.87500762939453,"wires":[]},{"id":"4a2e2509bb56578c","type":"change","z":"f19fdae0c02b4f03","g":"1fad26711775a40e","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"11","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":855.7143249511719,"y":316.8572082519531,"wires":[["ba56e9576baa4861"]]},{"id":"de9e7db23aa445d4","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"1fad26711775a40e","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"10","tot":"num"}],"x":1266.7143173217773,"y":316.8572082519531,"wires":[[]]},{"id":"4ad5428bb1c2b43b","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"1fad26711775a40e","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"11","tot":"num"}],"x":1368.2143173217773,"y":373.3661079406738,"wires":[[]]},{"id":"3a69a6eab42aa620","type":"ut-assert-success","z":"f19fdae0c02b4f03","g":"1fad26711775a40e","name":"","count":"1000","x":953.5714263916016,"y":517.0714921951294,"wires":[]},{"id":"93d6c55ad6d1226d","type":"rbe","z":"f19fdae0c02b4f03","g":"bcbd77613b58fd14","name":"","func":"rbe","gap":"10%","start":"","inout":"out","septopics":false,"property":"fubar","topi":"topic","x":1044.2857666015625,"y":878.5714721679688,"wires":[["1b6070bfb3872cb0","e55e7353f2bac7d8","0ca2a03e246542f6"]]},{"id":"6a895b8bf87276db","type":"inject","z":"f19fdae0c02b4f03","g":"bcbd77613b58fd14","name":"","props":[{"p":"counter","v":"0","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":179.2857666015625,"y":878.5714721679688,"wires":[["59dce407eef8cca0"]]},{"id":"59dce407eef8cca0","type":"change","z":"f19fdae0c02b4f03","g":"bcbd77613b58fd14","name":"","rules":[{"t":"set","p":"fubar","pt":"msg","to":"10","tot":"num"},{"t":"set","p":"counter","pt":"msg","to":"$$.counter + 1","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":625.2857666015625,"y":878.5714721679688,"wires":[["1d0568738eeca121","93d6c55ad6d1226d","5104a3873348939b"]]},{"id":"1d0568738eeca121","type":"switch","z":"f19fdae0c02b4f03","g":"bcbd77613b58fd14","name":"limit to 1000 messages","property":"counter","propertyType":"msg","rules":[{"t":"lt","v":"1000","vt":"num"},{"t":"else"}],"checkall":"false","repair":false,"outputs":2,"x":625.2857666015625,"y":658.9464721679688,"wires":[["59dce407eef8cca0"],["48147307210ff02d"]]},{"id":"1b6070bfb3872cb0","type":"ut-assert-success","z":"f19fdae0c02b4f03","g":"bcbd77613b58fd14","name":"","count":"2","x":1468.2857666015625,"y":878.5714721679688,"wires":[]},{"id":"48147307210ff02d","type":"change","z":"f19fdae0c02b4f03","g":"bcbd77613b58fd14","name":"","rules":[{"t":"set","p":"fubar","pt":"msg","to":"11","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":864.285774230957,"y":765.5536727905273,"wires":[["93d6c55ad6d1226d"]]},{"id":"e55e7353f2bac7d8","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"bcbd77613b58fd14","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"fubar","pt":"msg","to":"10","tot":"num"}],"x":1265.2857666015625,"y":765.5536727905273,"wires":[[]]},{"id":"0ca2a03e246542f6","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"bcbd77613b58fd14","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"fubar","pt":"msg","to":"11","tot":"num"}],"x":1366.7857666015625,"y":822.062572479248,"wires":[[]]},{"id":"5104a3873348939b","type":"ut-assert-success","z":"f19fdae0c02b4f03","g":"bcbd77613b58fd14","name":"","count":"1000","x":939.2857437133789,"y":947.1965408325195,"wires":[]},{"id":"efe7ba3be4543696","type":"rbe","z":"f19fdae0c02b4f03","g":"fd7e9b5411af529a","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":772,"y":1141,"wires":[["bc46ed8ef3228081","ac89fbae93406c6b","0766942615326863","562c17db94814a4d","70cbcae5d6ecbd90"]]},{"id":"67ab18c23e6c587b","type":"inject","z":"f19fdae0c02b4f03","g":"fd7e9b5411af529a","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":178,"y":1141,"wires":[["efe7ba3be4543696","a97de0b6702f0df0","477a74766db49b18","fa0885e500e36329"]]},{"id":"0b44e89a334f0d8a","type":"delay","z":"f19fdae0c02b4f03","g":"fd7e9b5411af529a","name":"","pauseType":"delay","timeout":"100","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":571,"y":1197.5,"wires":[["efe7ba3be4543696"]]},{"id":"db5d759eb00cc309","type":"delay","z":"f19fdae0c02b4f03","g":"fd7e9b5411af529a","name":"","pauseType":"delay","timeout":"200","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":576,"y":1249.5,"wires":[["efe7ba3be4543696"]]},{"id":"cf9d3c1218efdb76","type":"delay","z":"f19fdae0c02b4f03","g":"fd7e9b5411af529a","name":"","pauseType":"delay","timeout":"300","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":611,"y":1308.5,"wires":[["efe7ba3be4543696"]]},{"id":"bc46ed8ef3228081","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"fd7e9b5411af529a","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"2","tot":"num"}],"x":1076,"y":1240.5,"wires":[[]]},{"id":"ac89fbae93406c6b","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"fd7e9b5411af529a","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"3","tot":"num"}],"x":1076,"y":1290.25,"wires":[[]]},{"id":"0766942615326863","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"fd7e9b5411af529a","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"4","tot":"num"}],"x":1076,"y":1340,"wires":[[]]},{"id":"562c17db94814a4d","type":"ut-assert-success","z":"f19fdae0c02b4f03","g":"fd7e9b5411af529a","name":"","count":"4","x":1056,"y":1141,"wires":[]},{"id":"a97de0b6702f0df0","type":"change","z":"f19fdae0c02b4f03","g":"fd7e9b5411af529a","name":"payload = 2","rules":[{"t":"set","p":"payload","pt":"msg","to":"2","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":1197.5,"wires":[["0b44e89a334f0d8a"]]},{"id":"477a74766db49b18","type":"change","z":"f19fdae0c02b4f03","g":"fd7e9b5411af529a","name":"payload = 3 ","rules":[{"t":"set","p":"payload","pt":"msg","to":"3","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":374,"y":1249.5,"wires":[["db5d759eb00cc309"]]},{"id":"fa0885e500e36329","type":"change","z":"f19fdae0c02b4f03","g":"fd7e9b5411af529a","name":"payload = 4","rules":[{"t":"set","p":"payload","pt":"msg","to":"4","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":356,"y":1308.5,"wires":[["cf9d3c1218efdb76"]]},{"id":"70cbcae5d6ecbd90","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"fd7e9b5411af529a","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"1","tot":"num"}],"x":1076,"y":1190.75,"wires":[[]]},{"id":"7f05cc05bd28ba55","type":"rbe","z":"f19fdae0c02b4f03","g":"5a6888198548f8a1","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":1002,"y":1475,"wires":[["96d8d76f33ea1497","4fbd1b0bdd4d239b","623142d62c346a6d"]]},{"id":"077dab67f1b3e189","type":"inject","z":"f19fdae0c02b4f03","g":"5a6888198548f8a1","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":408,"y":1475,"wires":[["7f05cc05bd28ba55","d153932e2569b829","81db7508d0f3aeb5","01f9ade51488b89b"]]},{"id":"7f756373695c6370","type":"delay","z":"f19fdae0c02b4f03","g":"5a6888198548f8a1","name":"","pauseType":"delay","timeout":"100","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":801,"y":1531.5,"wires":[["7f05cc05bd28ba55"]]},{"id":"01f9ade51488b89b","type":"delay","z":"f19fdae0c02b4f03","g":"5a6888198548f8a1","name":"","pauseType":"delay","timeout":"200","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":599.8888626098633,"y":1587.4444618225098,"wires":[["3c2936242e3e2197"]]},{"id":"932d64cad9078ef8","type":"delay","z":"f19fdae0c02b4f03","g":"5a6888198548f8a1","name":"","pauseType":"delay","timeout":"300","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":841,"y":1642.5,"wires":[["7f05cc05bd28ba55"]]},{"id":"96d8d76f33ea1497","type":"ut-assert-success","z":"f19fdae0c02b4f03","g":"5a6888198548f8a1","name":"","msglimit":"==","count":"2","x":1286,"y":1475,"wires":[]},{"id":"d153932e2569b829","type":"change","z":"f19fdae0c02b4f03","g":"5a6888198548f8a1","name":"","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":1531.5,"wires":[["7f756373695c6370"]]},{"id":"81db7508d0f3aeb5","type":"change","z":"f19fdae0c02b4f03","g":"5a6888198548f8a1","name":"","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":596,"y":1642.5,"wires":[["932d64cad9078ef8"]]},{"id":"4fbd1b0bdd4d239b","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"5a6888198548f8a1","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"1","tot":"num"}],"x":1306,"y":1526.5,"wires":[[]]},{"id":"3c2936242e3e2197","type":"change","z":"f19fdae0c02b4f03","g":"5a6888198548f8a1","name":"reset and no payload value","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"},{"t":"delete","p":"payload","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":851.4443435668945,"y":1587.4444618225098,"wires":[["7f05cc05bd28ba55"]]},{"id":"02fc55a36c40a947","type":"rbe","z":"f19fdae0c02b4f03","g":"092da56d4fc7ede2","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":999,"y":1748,"wires":[["fae6e45348541c43","38ac3f21aadabc47","edc50f0873a61a11"]]},{"id":"86a313fe6909822f","type":"inject","z":"f19fdae0c02b4f03","g":"092da56d4fc7ede2","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":405,"y":1748,"wires":[["02fc55a36c40a947","93c1e98a446de545","5ea3dfd575e08333","2cdadb27c4b1ac57"]]},{"id":"16c6e5df668cfaa5","type":"delay","z":"f19fdae0c02b4f03","g":"092da56d4fc7ede2","name":"","pauseType":"delay","timeout":"100","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":798,"y":1804.5,"wires":[["02fc55a36c40a947"]]},{"id":"2cdadb27c4b1ac57","type":"delay","z":"f19fdae0c02b4f03","g":"092da56d4fc7ede2","name":"","pauseType":"delay","timeout":"200","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":596.8888626098633,"y":1860.4444618225098,"wires":[["bc564a8cfb91a4c3"]]},{"id":"59b58ece613dd2ae","type":"delay","z":"f19fdae0c02b4f03","g":"092da56d4fc7ede2","name":"","pauseType":"delay","timeout":"300","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":838,"y":1915.5,"wires":[["02fc55a36c40a947"]]},{"id":"fae6e45348541c43","type":"ut-assert-success","z":"f19fdae0c02b4f03","g":"092da56d4fc7ede2","name":"","msglimit":"==","count":"2","x":1283,"y":1748,"wires":[]},{"id":"93c1e98a446de545","type":"change","z":"f19fdae0c02b4f03","g":"092da56d4fc7ede2","name":"","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":617,"y":1804.5,"wires":[["16c6e5df668cfaa5"]]},{"id":"5ea3dfd575e08333","type":"change","z":"f19fdae0c02b4f03","g":"092da56d4fc7ede2","name":"","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":593,"y":1915.5,"wires":[["59b58ece613dd2ae"]]},{"id":"38ac3f21aadabc47","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"092da56d4fc7ede2","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"1","tot":"num"}],"x":1303,"y":1802,"wires":[[]]},{"id":"bc564a8cfb91a4c3","type":"change","z":"f19fdae0c02b4f03","g":"092da56d4fc7ede2","name":"reset and set payload = 1","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"},{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":838.4443435668945,"y":1860.4444618225098,"wires":[["02fc55a36c40a947"]]},{"id":"1a3197b267034b2c","type":"rbe","z":"f19fdae0c02b4f03","g":"a3a026c062320c8a","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":997,"y":2023,"wires":[["e5aaf1cd293ba857","1c9e26aa6c0955f4","7a7ef9f42a37146f","0fc9d9b4a1ab06e3"]]},{"id":"b3bce9bfa78aa434","type":"inject","z":"f19fdae0c02b4f03","g":"a3a026c062320c8a","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":403,"y":2023,"wires":[["1a3197b267034b2c","c6d120f72ee51aa6","4f28a47062a337c9","12684a01439a597e"]]},{"id":"4297bf467c2011a9","type":"delay","z":"f19fdae0c02b4f03","g":"a3a026c062320c8a","name":"","pauseType":"delay","timeout":"100","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":796,"y":2079.5,"wires":[["1a3197b267034b2c"]]},{"id":"12684a01439a597e","type":"delay","z":"f19fdae0c02b4f03","g":"a3a026c062320c8a","name":"","pauseType":"delay","timeout":"200","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":594.8888626098633,"y":2135.4444618225098,"wires":[["9366e15d3d4a8c5f"]]},{"id":"18f44fa2be405d8e","type":"delay","z":"f19fdae0c02b4f03","g":"a3a026c062320c8a","name":"","pauseType":"delay","timeout":"300","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":836,"y":2190.5,"wires":[["1a3197b267034b2c"]]},{"id":"e5aaf1cd293ba857","type":"ut-assert-success","z":"f19fdae0c02b4f03","g":"a3a026c062320c8a","name":"","msglimit":"==","count":"3","x":1279,"y":2023,"wires":[]},{"id":"c6d120f72ee51aa6","type":"change","z":"f19fdae0c02b4f03","g":"a3a026c062320c8a","name":"","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":615,"y":2079.5,"wires":[["4297bf467c2011a9"]]},{"id":"4f28a47062a337c9","type":"change","z":"f19fdae0c02b4f03","g":"a3a026c062320c8a","name":"","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":591,"y":2190.5,"wires":[["18f44fa2be405d8e"]]},{"id":"1c9e26aa6c0955f4","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"a3a026c062320c8a","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"1","tot":"num"}],"x":1299,"y":2075.6666666666665,"wires":[[]]},{"id":"9366e15d3d4a8c5f","type":"change","z":"f19fdae0c02b4f03","g":"a3a026c062320c8a","name":"reset and set payload = 2","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"},{"t":"set","p":"payload","pt":"msg","to":"2","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":836.4443435668945,"y":2135.4444618225098,"wires":[["1a3197b267034b2c"]]},{"id":"edc50f0873a61a11","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"092da56d4fc7ede2","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"set","p":"reset","pt":"msg"}],"x":1273,"y":1856,"wires":[[]]},{"id":"623142d62c346a6d","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"5a6888198548f8a1","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"notset","p":"reset","pt":"msg"}],"x":1286,"y":1578,"wires":[[]]},{"id":"7a7ef9f42a37146f","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"a3a026c062320c8a","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"set","p":"reset","pt":"msg"}],"x":1269,"y":2128.333333333333,"wires":[[]]},{"id":"2fffbe7ec823c205","type":"rbe","z":"f19fdae0c02b4f03","g":"1ddf8af78834dbe6","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":986,"y":2340,"wires":[["42554d60d038523a","9526163eeb8f0fca","18d95c0b2ebf07b5","c75b73c5d9862969"]]},{"id":"f733c08f2aa8412f","type":"inject","z":"f19fdae0c02b4f03","g":"1ddf8af78834dbe6","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":392,"y":2340,"wires":[["2fffbe7ec823c205","e9fc94a94594fe0a","0f198067e9b65697","c9c02cf85d9686e6"]]},{"id":"5eb1373d510ad013","type":"delay","z":"f19fdae0c02b4f03","g":"1ddf8af78834dbe6","name":"","pauseType":"delay","timeout":"200","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":785,"y":2396.5,"wires":[["2fffbe7ec823c205"]]},{"id":"c9c02cf85d9686e6","type":"delay","z":"f19fdae0c02b4f03","g":"1ddf8af78834dbe6","name":"","pauseType":"delay","timeout":"400","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":583.8888626098633,"y":2452.4444618225098,"wires":[["7a2086b973140eb2"]]},{"id":"66576bba148d46d8","type":"delay","z":"f19fdae0c02b4f03","g":"1ddf8af78834dbe6","name":"","pauseType":"delay","timeout":"600","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":825,"y":2507.5,"wires":[["2fffbe7ec823c205"]]},{"id":"42554d60d038523a","type":"ut-assert-success","z":"f19fdae0c02b4f03","g":"1ddf8af78834dbe6","name":"","msglimit":"==","count":"2","x":1268,"y":2340,"wires":[]},{"id":"e9fc94a94594fe0a","type":"change","z":"f19fdae0c02b4f03","g":"1ddf8af78834dbe6","name":"","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":604,"y":2396.5,"wires":[["5eb1373d510ad013"]]},{"id":"0f198067e9b65697","type":"change","z":"f19fdae0c02b4f03","g":"1ddf8af78834dbe6","name":"payload = 2","rules":[{"t":"set","p":"payload","pt":"msg","to":"2","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":570,"y":2507.5,"wires":[["66576bba148d46d8"]]},{"id":"9526163eeb8f0fca","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"1ddf8af78834dbe6","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"1","tot":"num"}],"x":1288,"y":2397,"wires":[[]]},{"id":"7a2086b973140eb2","type":"change","z":"f19fdae0c02b4f03","g":"1ddf8af78834dbe6","name":"reset and set payload = 2","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"},{"t":"set","p":"payload","pt":"msg","to":"2","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":825.4443435668945,"y":2452.4444618225098,"wires":[["2fffbe7ec823c205"]]},{"id":"18d95c0b2ebf07b5","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"1ddf8af78834dbe6","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"set","p":"reset","pt":"msg"}],"x":1258,"y":2454,"wires":[[]]},{"id":"c75b73c5d9862969","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"1ddf8af78834dbe6","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"2","tot":"num"}],"x":1288,"y":2511,"wires":[[]]},{"id":"0fc9d9b4a1ab06e3","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"a3a026c062320c8a","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"2","tot":"num"}],"x":1299,"y":2181,"wires":[[]]},{"id":"8f60e7d8adf7d125","type":"rbe","z":"f19fdae0c02b4f03","g":"d60898375c22ed1b","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":2202,"y":1747,"wires":[["1390a5bb66913d7f","d2a5d53a1912825c","5aad16a5af063f9a","9f80bcadd23308cf"]]},{"id":"ea4608cab97ce1d1","type":"inject","z":"f19fdae0c02b4f03","g":"d60898375c22ed1b","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":1608,"y":1747,"wires":[["8f60e7d8adf7d125","287496ac14c32e27","82dff00f04f07d69","3bdd95af7f84d9fd"]]},{"id":"72dc1879f1f4d898","type":"delay","z":"f19fdae0c02b4f03","g":"d60898375c22ed1b","name":"","pauseType":"delay","timeout":"100","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":2001,"y":1803.5,"wires":[["8f60e7d8adf7d125"]]},{"id":"3bdd95af7f84d9fd","type":"delay","z":"f19fdae0c02b4f03","g":"d60898375c22ed1b","name":"","pauseType":"delay","timeout":"200","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1799.8888626098633,"y":1859.4444618225098,"wires":[["5d46132c6cb2c629"]]},{"id":"04f37c8f3dea1457","type":"delay","z":"f19fdae0c02b4f03","g":"d60898375c22ed1b","name":"","pauseType":"delay","timeout":"300","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":2041,"y":1914.5,"wires":[["8f60e7d8adf7d125"]]},{"id":"1390a5bb66913d7f","type":"ut-assert-success","z":"f19fdae0c02b4f03","g":"d60898375c22ed1b","name":"","msglimit":"==","count":"3","x":2486,"y":1747,"wires":[]},{"id":"287496ac14c32e27","type":"change","z":"f19fdae0c02b4f03","g":"d60898375c22ed1b","name":"","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":1820,"y":1803.5,"wires":[["72dc1879f1f4d898"]]},{"id":"82dff00f04f07d69","type":"change","z":"f19fdae0c02b4f03","g":"d60898375c22ed1b","name":"payload = 2","rules":[{"t":"set","p":"payload","pt":"msg","to":"2","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1786,"y":1914.5,"wires":[["04f37c8f3dea1457"]]},{"id":"d2a5d53a1912825c","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"d60898375c22ed1b","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"1","tot":"num"}],"x":2506,"y":1803.6666666666667,"wires":[[]]},{"id":"5d46132c6cb2c629","type":"change","z":"f19fdae0c02b4f03","g":"d60898375c22ed1b","name":"reset and set payload = 1","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"},{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":2041.4443435668945,"y":1859.4444618225098,"wires":[["8f60e7d8adf7d125"]]},{"id":"5aad16a5af063f9a","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"d60898375c22ed1b","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"set","p":"reset","pt":"msg"}],"x":2476,"y":1860.3333333333335,"wires":[[]]},{"id":"9f80bcadd23308cf","type":"ut-assert-values","z":"f19fdae0c02b4f03","g":"d60898375c22ed1b","name":"","ignore_failure_if_succeed":true,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"2","tot":"num"}],"x":2506,"y":1917,"wires":[[]]}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"id":"70fb2a061a2b073d","type":"tab","label":"[flowhubpull] retrieve flow id","disabled":false,"info":"","env":[{"name":"ERED_ONLY","value":"true","type":"bool"}]},{"id":"25d0e57a7ef7d421","type":"group","z":"70fb2a061a2b073d","name":"flowid configured on node","style":{"label":true},"nodes":["4b46f1f2d5dc1263","a1dd14b5caad6cf0","dee10be3d9b662cd","2e58215af0d68b56","c2531fb627dbde3c","9de928a80f1a12fc","6436dc3078d96255","26796c184a940ef3","52cc643057d9e8b2"],"x":71,"y":76.77778100967407,"w":1110,"h":273.7222189903259},{"id":"b860f91f45ac9b1f","type":"group","z":"70fb2a061a2b073d","name":"flowid configured on msg","style":{"label":true},"nodes":["09a84c10ed4b3472","be03413177e0343e","80a8f5ec6e79f428","08051f4ce4b83c7c","87c27449f687518d","07dafc2b90dd1d07","a59661a14483d5a5","cdfaf380723de514","a1e701f0670d2837"],"x":112.4444580078125,"y":397.888916015625,"w":1066.6666564941406,"h":277.3333282470703},{"id":"5889b06b0bf92818","type":"group","z":"70fb2a061a2b073d","name":"no flowid set","style":{"label":true},"nodes":["05eb40ca93899f2a","250906ad1f0ece4d","d1a6c480c67cc4a0","7689c63c4de8ac44","dd292701c7ad5efe","e071e164dc3e31b0"],"x":231.77777099609375,"y":769.0000610351562,"w":777.5555534362793,"h":203.72218704223633},{"id":"4b46f1f2d5dc1263","type":"FlowHubPull","z":"70fb2a061a2b073d","g":"25d0e57a7ef7d421","name":"","notab":false,"flowid":"70fb2a061a2b073d","flowname":"[flowhubpull] retrieve flow id","flowrevision":"","x":453,"y":304.5,"wires":[["2e58215af0d68b56","c2531fb627dbde3c"],["dee10be3d9b662cd"]]},{"id":"a1dd14b5caad6cf0","type":"inject","z":"70fb2a061a2b073d","g":"25d0e57a7ef7d421","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":167,"y":240,"wires":[["4b46f1f2d5dc1263"]]},{"id":"dee10be3d9b662cd","type":"ut-assert-failure","z":"70fb2a061a2b073d","g":"25d0e57a7ef7d421","name":"","x":772.2222366333008,"y":309.5,"wires":[]},{"id":"2e58215af0d68b56","type":"ut-assert-success","z":"70fb2a061a2b073d","g":"25d0e57a7ef7d421","name":"","count":1,"x":772.2222366333008,"y":163.5,"wires":[]},{"id":"c2531fb627dbde3c","type":"json","z":"70fb2a061a2b073d","g":"25d0e57a7ef7d421","name":"","property":"payload","action":"","pretty":false,"x":752.2222366333008,"y":239.5,"wires":[["6436dc3078d96255"]]},{"id":"9de928a80f1a12fc","type":"ut-assert-values","z":"70fb2a061a2b073d","g":"25d0e57a7ef7d421","name":"","ignore_failure_if_succeed":false,"rules":[{"
|
|
1
|
+
[{"id":"70fb2a061a2b073d","type":"tab","label":"[flowhubpull] retrieve flow id","disabled":false,"info":"","env":[{"name":"ERED_ONLY","value":"true","type":"bool"},{"name":"ERED_PENDING","value":"true","type":"bool"}]},{"id":"25d0e57a7ef7d421","type":"group","z":"70fb2a061a2b073d","name":"flowid configured on node","style":{"label":true},"nodes":["4b46f1f2d5dc1263","a1dd14b5caad6cf0","dee10be3d9b662cd","2e58215af0d68b56","c2531fb627dbde3c","9de928a80f1a12fc","6436dc3078d96255","26796c184a940ef3","52cc643057d9e8b2"],"x":71,"y":76.77778100967407,"w":1110,"h":273.7222189903259},{"id":"b860f91f45ac9b1f","type":"group","z":"70fb2a061a2b073d","name":"flowid configured on msg","style":{"label":true},"nodes":["09a84c10ed4b3472","be03413177e0343e","80a8f5ec6e79f428","08051f4ce4b83c7c","87c27449f687518d","07dafc2b90dd1d07","a59661a14483d5a5","cdfaf380723de514","a1e701f0670d2837"],"x":112.4444580078125,"y":397.888916015625,"w":1066.6666564941406,"h":277.3333282470703},{"id":"5889b06b0bf92818","type":"group","z":"70fb2a061a2b073d","name":"no flowid set","style":{"label":true},"nodes":["05eb40ca93899f2a","250906ad1f0ece4d","d1a6c480c67cc4a0","7689c63c4de8ac44","dd292701c7ad5efe","e071e164dc3e31b0"],"x":231.77777099609375,"y":769.0000610351562,"w":777.5555534362793,"h":203.72218704223633},{"id":"4b46f1f2d5dc1263","type":"FlowHubPull","z":"70fb2a061a2b073d","g":"25d0e57a7ef7d421","name":"","notab":false,"flowid":"70fb2a061a2b073d","flowname":"[flowhubpull] retrieve flow id","flowrevision":"","x":453,"y":304.5,"wires":[["2e58215af0d68b56","c2531fb627dbde3c"],["dee10be3d9b662cd"]]},{"id":"a1dd14b5caad6cf0","type":"inject","z":"70fb2a061a2b073d","g":"25d0e57a7ef7d421","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":167,"y":240,"wires":[["4b46f1f2d5dc1263"]]},{"id":"dee10be3d9b662cd","type":"ut-assert-failure","z":"70fb2a061a2b073d","g":"25d0e57a7ef7d421","name":"","x":772.2222366333008,"y":309.5,"wires":[]},{"id":"2e58215af0d68b56","type":"ut-assert-success","z":"70fb2a061a2b073d","g":"25d0e57a7ef7d421","name":"","count":1,"x":772.2222366333008,"y":163.5,"wires":[]},{"id":"c2531fb627dbde3c","type":"json","z":"70fb2a061a2b073d","g":"25d0e57a7ef7d421","name":"","property":"payload","action":"","pretty":false,"x":752.2222366333008,"y":239.5,"wires":[["6436dc3078d96255"]]},{"id":"9de928a80f1a12fc","type":"ut-assert-values","z":"70fb2a061a2b073d","g":"25d0e57a7ef7d421","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"payload","pt":"msg","t":"eql","to":"28","tot":"num"}],"x":1045,"y":309.5,"wires":[[]]},{"id":"6436dc3078d96255","type":"change","z":"70fb2a061a2b073d","g":"25d0e57a7ef7d421","name":"","rules":[{"p":"payload","pt":"msg","t":"set","to":"$count($$.payload)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1055,"y":239.5,"wires":[["9de928a80f1a12fc"]]},{"id":"09a84c10ed4b3472","type":"inject","z":"70fb2a061a2b073d","g":"b860f91f45ac9b1f","name":"set flowid","props":[{"p":"flowid","v":"70fb2a061a2b073d","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":218.4444580078125,"y":512.500057220459,"wires":[["a59661a14483d5a5"]]},{"id":"be03413177e0343e","type":"ut-assert-failure","z":"70fb2a061a2b073d","g":"b860f91f45ac9b1f","name":"","x":773.1111145019531,"y":634.2222442626953,"wires":[]},{"id":"80a8f5ec6e79f428","type":"ut-assert-success","z":"70fb2a061a2b073d","g":"b860f91f45ac9b1f","name":"","count":1,"x":773.1111145019531,"y":488.2222442626953,"wires":[]},{"id":"08051f4ce4b83c7c","type":"json","z":"70fb2a061a2b073d","g":"b860f91f45ac9b1f","name":"","property":"payload","action":"","pretty":false,"x":753.1111145019531,"y":564.2222442626953,"wires":[["07dafc2b90dd1d07"]]},{"id":"87c27449f687518d","type":"ut-assert-values","z":"70fb2a061a2b073d","g":"b860f91f45ac9b1f","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"payload","pt":"msg","t":"eql","to":"28","tot":"num"}],"x":1043.1111145019531,"y":634.2222442626953,"wires":[[]]},{"id":"07dafc2b90dd1d07","type":"change","z":"70fb2a061a2b073d","g":"b860f91f45ac9b1f","name":"","rules":[{"p":"payload","pt":"msg","t":"set","to":"$count($$.payload)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1053.1111145019531,"y":564.2222442626953,"wires":[["87c27449f687518d"]]},{"id":"a59661a14483d5a5","type":"FlowHubPull","z":"70fb2a061a2b073d","g":"b860f91f45ac9b1f","name":"","notab":false,"flowid":"","flowname":"","flowrevision":"","x":458.8888702392578,"y":627.2222652435303,"wires":[["80a8f5ec6e79f428","08051f4ce4b83c7c"],["be03413177e0343e"]]},{"id":"05eb40ca93899f2a","type":"inject","z":"70fb2a061a2b073d","g":"5889b06b0bf92818","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":327.77777099609375,"y":810.0000610351562,"wires":[["d1a6c480c67cc4a0"]]},{"id":"250906ad1f0ece4d","type":"ut-assert-failure","z":"70fb2a061a2b073d","g":"5889b06b0bf92818","name":"","x":893.333324432373,"y":931.7222480773926,"wires":[]},{"id":"d1a6c480c67cc4a0","type":"FlowHubPull","z":"70fb2a061a2b073d","g":"5889b06b0bf92818","name":"","notab":false,"flowid":"","flowname":"","flowrevision":"","x":578.2221832275391,"y":924.7222690582275,"wires":[["7689c63c4de8ac44"],["250906ad1f0ece4d"]]},{"id":"7689c63c4de8ac44","type":"ut-assert-failure","z":"70fb2a061a2b073d","g":"5889b06b0bf92818","name":"","x":893.333324432373,"y":886.6667289733887,"wires":[]},{"id":"dd292701c7ad5efe","type":"catch","z":"70fb2a061a2b073d","g":"5889b06b0bf92818","name":"","scope":["d1a6c480c67cc4a0"],"uncaught":false,"x":569.9999796549479,"y":816.6666937934027,"wires":[["e071e164dc3e31b0"]]},{"id":"e071e164dc3e31b0","type":"ut-assert-success","z":"70fb2a061a2b073d","g":"5889b06b0bf92818","name":"","count":1,"x":893.333324432373,"y":816.6666889190674,"wires":[]},{"id":"cdfaf380723de514","type":"catch","z":"70fb2a061a2b073d","g":"b860f91f45ac9b1f","name":"","scope":["a59661a14483d5a5"],"uncaught":false,"x":470.00001525878906,"y":438.888916015625,"wires":[["a1e701f0670d2837"]]},{"id":"a1e701f0670d2837","type":"ut-assert-failure","z":"70fb2a061a2b073d","g":"b860f91f45ac9b1f","name":"","x":773.1111145019531,"y":438.888916015625,"wires":[]},{"id":"26796c184a940ef3","type":"catch","z":"70fb2a061a2b073d","g":"25d0e57a7ef7d421","name":"","scope":["4b46f1f2d5dc1263"],"uncaught":false,"x":467.77779388427734,"y":117.77778100967407,"wires":[["52cc643057d9e8b2"]]},{"id":"52cc643057d9e8b2","type":"ut-assert-failure","z":"70fb2a061a2b073d","g":"25d0e57a7ef7d421","name":"","x":772.2222366333008,"y":117.77778100967407,"wires":[]}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"id":"678153b1daa0529a","type":"tab","label":"[function] divide by zero throws kills node","disabled":false,"info":"## Function node and exceptions\n\nWhat happens if the function node raises an exception?\n\nThere are three cases to be considered:\n\n- <a class=\"ahl-group-only\" data-ids=\"b7e1e4d9d98ef1bb\">function node is under supervision</a>,\n- <a class=\"ahl-group-only\" data-ids=\"7ed7a1dc7f44409a\">function node is being caught</a> and\n- <a class=\"ahl-group-only\" data-ids=\"5bd563066938c2f3\">function node is neither</a>.\n\nThis is also the case for a <a class=\"ahl-group-only\" data-ids=\"e49cae74aca6e4aa\">time out exception</a> - if the function takes too long and there is a timeout set, then an exception is raised.\n","env":[{"name":"ERED_NOT_EUNIT","value":"true","type":"bool"},{"name":"ERED_TIMEOUT","value":"8","type":"num"},{"name":"ERED_ONLY","value":"true","type":"bool"}]},{"id":"e49cae74aca6e4aa","type":"group","z":"678153b1daa0529a","name":"time out exception","style":{"label":true},"nodes":["b2f1aafe54bf14d6","ae831a2255a48b68","3e2cbb65dff9baec"],"x":167.66665649414062,"y":1010,"w":1113.3333435058594,"h":759},{"id":"7d829222d2ef7ab2","type":"group","z":"678153b1daa0529a","name":"divide by zero exception","style":{"label":true},"nodes":["b7e1e4d9d98ef1bb","5bd563066938c2f3","7ed7a1dc7f44409a"],"x":168,"y":164,"w":1140,"h":797},{"id":"b7e1e4d9d98ef1bb","type":"group","z":"678153b1daa0529a","g":"7d829222d2ef7ab2","name":"no exception is raised if function is being supervised","style":{"label":true},"nodes":["e1926e702f82036d","0b270a75f19fe296","a7e6e47b5451fe98","f70d171602a22ea0","056c5807789fdd9f","a3c2a780a47683fa","25f64d67311491f0","c5616edc3d68cf06"],"x":199,"y":190,"w":1047,"h":217.125},{"id":"5bd563066938c2f3","type":"group","z":"678153b1daa0529a","g":"7d829222d2ef7ab2","name":"exception posted to the debug panel if exception not caught and function node not being supervised","style":{"label":true},"nodes":["2acfd9b89aa5a4f0","c2dc81f0f379b496","0610dfd55a620cd5","d36a8aa22bce4662","eb33aab579f867c1"],"x":194,"y":731,"w":1054,"h":204},{"id":"7ed7a1dc7f44409a","type":"group","z":"678153b1daa0529a","g":"7d829222d2ef7ab2","name":"if exception is caught, no debug message and the catch node handles it","style":{"label":true},"nodes":["1064a20a70a4d159","cbbdca5f81537d51","94f0dace67bcab25","714c969b3b036080","a7747cea4a1b7ac5","c35fef31f0dec2c7","6a4bfef352350b72"],"x":196,"y":452.5,"w":1086,"h":235.5},{"id":"b2f1aafe54bf14d6","type":"group","z":"678153b1daa0529a","g":"e49cae74aca6e4aa","name":"no exception is raised if function is being supervised","style":{"label":true},"nodes":["8c0d2959be4c8449","7c60e8efbf36cfb2","2bad596c31c9614c","478f54839df11249","5210bb11cbfd8184","637da1e5ea2fa8d2","8e15d37d50603cbe","0804f9de5cbb31b7"],"x":193.66665649414062,"y":1036,"w":1048.3333435058594,"h":217.125},{"id":"ae831a2255a48b68","type":"group","z":"678153b1daa0529a","g":"e49cae74aca6e4aa","name":"exception posted to the debug panel if exception not caught and function node not being supervised","style":{"label":true},"nodes":["e6bad32c2babea2d","43921beebe749863","247105e3e1174886","576520af1b49706d","e56ffd82b2beaec5"],"x":197.66665649414062,"y":1539,"w":1039.3333435058594,"h":204},{"id":"3e2cbb65dff9baec","type":"group","z":"678153b1daa0529a","g":"e49cae74aca6e4aa","name":"if exception is caught, no debug message and the catch node handles it","style":{"label":true},"nodes":["98af67622beba548","96a1bf65b0361c8d","6fd4f21bd30c0756","798d290779817374","0e5f5779ab066e4c","b20ed504160e56a2","ef0862b998bd51e6"],"x":195.66665649414062,"y":1281.5,"w":1059.3333435058594,"h":235.5},{"id":"e1926e702f82036d","type":"inject","z":"678153b1daa0529a","g":"b7e1e4d9d98ef1bb","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":305,"y":366.125,"wires":[["0b270a75f19fe296"]]},{"id":"0b270a75f19fe296","type":"function","z":"678153b1daa0529a","g":"b7e1e4d9d98ef1bb","name":"divide by zero causes an exception","func":"\n1 / 0","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":566,"y":366.125,"wires":[["f70d171602a22ea0"]]},{"id":"a7e6e47b5451fe98","type":"catch","z":"678153b1daa0529a","g":"b7e1e4d9d98ef1bb","name":"","scope":["0b270a75f19fe296"],"uncaught":false,"x":518,"y":239,"wires":[["a3c2a780a47683fa"]]},{"id":"f70d171602a22ea0","type":"ut-assert-failure","z":"678153b1daa0529a","g":"b7e1e4d9d98ef1bb","name":"","x":990,"y":366.125,"wires":[]},{"id":"056c5807789fdd9f","type":"erlsupervisor","z":"678153b1daa0529a","g":"b7e1e4d9d98ef1bb","auto_shutdown":"never","child_restart":"permanent","child_shutdown":"brutal_kill","child_shutdown_timeout":"0","child_type":"worker","intensity":"1","name":"","period":"5","scope":["0b270a75f19fe296"],"strategy":"one_for_one","supervisor_type":"static","x":327,"y":241.5,"wires":[[]]},{"id":"2acfd9b89aa5a4f0","type":"inject","z":"678153b1daa0529a","g":"5bd563066938c2f3","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":300,"y":772,"wires":[["c2dc81f0f379b496"]]},{"id":"c2dc81f0f379b496","type":"function","z":"678153b1daa0529a","g":"5bd563066938c2f3","name":"divide by zero causes an exception","func":"1 / 0","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":598,"y":829.75,"wires":[["0610dfd55a620cd5"]]},{"id":"0610dfd55a620cd5","type":"ut-assert-failure","z":"678153b1daa0529a","g":"5bd563066938c2f3","name":"","x":978,"y":829.75,"wires":[]},{"id":"d36a8aa22bce4662","type":"ut-assert-debug","z":"678153b1daa0529a","g":"5bd563066938c2f3","name":"","scope":["c2dc81f0f379b496"],"nodeid":"c2dc81f0f379b496","msgtype":"error","inverse":false,"x":664,"y":894,"wires":[["eb33aab579f867c1"]]},{"id":"a3c2a780a47683fa","type":"ut-assert-failure","z":"678153b1daa0529a","g":"b7e1e4d9d98ef1bb","name":"","x":827,"y":307,"wires":[]},{"id":"1064a20a70a4d159","type":"inject","z":"678153b1daa0529a","g":"7ed7a1dc7f44409a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":302,"y":569.625,"wires":[["cbbdca5f81537d51"]]},{"id":"cbbdca5f81537d51","type":"function","z":"678153b1daa0529a","g":"7ed7a1dc7f44409a","name":"divide by zero causes an exception","func":"1 / 0","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":562,"y":569.625,"wires":[["94f0dace67bcab25"]]},{"id":"94f0dace67bcab25","type":"ut-assert-failure","z":"678153b1daa0529a","g":"7ed7a1dc7f44409a","name":"","x":890,"y":569.625,"wires":[]},{"id":"714c969b3b036080","type":"ut-assert-debug","z":"678153b1daa0529a","g":"7ed7a1dc7f44409a","name":"","scope":["cbbdca5f81537d51"],"nodeid":"cbbdca5f81537d51","msgtype":"error","inverse":true,"x":819,"y":647,"wires":[["6a4bfef352350b72"]]},{"id":"a7747cea4a1b7ac5","type":"catch","z":"678153b1daa0529a","g":"7ed7a1dc7f44409a","name":"","scope":["cbbdca5f81537d51"],"uncaught":false,"x":515,"y":493.5,"wires":[["c35fef31f0dec2c7"]]},{"id":"c35fef31f0dec2c7","type":"ut-assert-success","z":"678153b1daa0529a","g":"7ed7a1dc7f44409a","name":"","count":1,"x":940,"y":493.5,"wires":[]},{"id":"25f64d67311491f0","type":"ut-assert-debug","z":"678153b1daa0529a","g":"b7e1e4d9d98ef1bb","name":"","scope":["0b270a75f19fe296"],"nodeid":"0b270a75f19fe296","msgtype":"error","inverse":true,"x":882,"y":231,"wires":[["c5616edc3d68cf06"]]},{"id":"8c0d2959be4c8449","type":"inject","z":"678153b1daa0529a","g":"b2f1aafe54bf14d6","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":299.6666564941406,"y":1212.125,"wires":[["7c60e8efbf36cfb2"]]},{"id":"7c60e8efbf36cfb2","type":"function","z":"678153b1daa0529a","g":"b2f1aafe54bf14d6","name":"divide by zero causes an exception","func":"\ntimer:sleep(5_000)","outputs":1,"timeout":"1","noerr":0,"initialize":"","finalize":"","libs":[],"x":560.6666564941406,"y":1212.125,"wires":[["478f54839df11249"]]},{"id":"2bad596c31c9614c","type":"catch","z":"678153b1daa0529a","g":"b2f1aafe54bf14d6","name":"","scope":["7c60e8efbf36cfb2"],"uncaught":false,"x":512.6666564941406,"y":1085,"wires":[["637da1e5ea2fa8d2"]]},{"id":"478f54839df11249","type":"ut-assert-failure","z":"678153b1daa0529a","g":"b2f1aafe54bf14d6","name":"","x":984.6666564941406,"y":1212.125,"wires":[]},{"id":"5210bb11cbfd8184","type":"erlsupervisor","z":"678153b1daa0529a","g":"b2f1aafe54bf14d6","auto_shutdown":"never","child_restart":"permanent","child_shutdown":"brutal_kill","child_shutdown_timeout":"0","child_type":"worker","intensity":"1","name":"","period":"5","scope":["7c60e8efbf36cfb2"],"strategy":"one_for_one","supervisor_type":"static","x":321.6666564941406,"y":1087.5,"wires":[[]]},{"id":"637da1e5ea2fa8d2","type":"ut-assert-failure","z":"678153b1daa0529a","g":"b2f1aafe54bf14d6","name":"","x":821.6666564941406,"y":1153,"wires":[]},{"id":"8e15d37d50603cbe","type":"ut-assert-debug","z":"678153b1daa0529a","g":"b2f1aafe54bf14d6","name":"","scope":["7c60e8efbf36cfb2"],"nodeid":"7c60e8efbf36cfb2","msgtype":"error","inverse":true,"x":876.6666564941406,"y":1077,"wires":[["0804f9de5cbb31b7"]]},{"id":"e6bad32c2babea2d","type":"inject","z":"678153b1daa0529a","g":"ae831a2255a48b68","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":303.6666564941406,"y":1580,"wires":[["43921beebe749863"]]},{"id":"43921beebe749863","type":"function","z":"678153b1daa0529a","g":"ae831a2255a48b68","name":"divide by zero causes an exception","func":"timer:sleep(5_000)","outputs":1,"timeout":"1","noerr":0,"initialize":"","finalize":"","libs":[],"x":601.6666564941406,"y":1637.75,"wires":[["247105e3e1174886"]]},{"id":"247105e3e1174886","type":"ut-assert-failure","z":"678153b1daa0529a","g":"ae831a2255a48b68","name":"","x":981.6666564941406,"y":1637.75,"wires":[]},{"id":"576520af1b49706d","type":"ut-assert-debug","z":"678153b1daa0529a","g":"ae831a2255a48b68","name":"","scope":["43921beebe749863"],"nodeid":"43921beebe749863","msgtype":"error","inverse":false,"x":667.6666564941406,"y":1702,"wires":[["e56ffd82b2beaec5"]]},{"id":"98af67622beba548","type":"inject","z":"678153b1daa0529a","g":"3e2cbb65dff9baec","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":301.6666564941406,"y":1397.8125,"wires":[["96a1bf65b0361c8d"]]},{"id":"96a1bf65b0361c8d","type":"function","z":"678153b1daa0529a","g":"3e2cbb65dff9baec","name":"divide by zero causes an exception","func":"timer:sleep(5_000)","outputs":1,"timeout":"1","noerr":0,"initialize":"","finalize":"","libs":[],"x":561.6666564941406,"y":1397.8125,"wires":[["6fd4f21bd30c0756"]]},{"id":"6fd4f21bd30c0756","type":"ut-assert-failure","z":"678153b1daa0529a","g":"3e2cbb65dff9baec","name":"","x":889.6666564941406,"y":1397.8125,"wires":[]},{"id":"798d290779817374","type":"ut-assert-debug","z":"678153b1daa0529a","g":"3e2cbb65dff9baec","name":"","scope":["96a1bf65b0361c8d"],"nodeid":"96a1bf65b0361c8d","msgtype":"error","inverse":true,"x":818.6666564941406,"y":1476,"wires":[["ef0862b998bd51e6"]]},{"id":"0e5f5779ab066e4c","type":"catch","z":"678153b1daa0529a","g":"3e2cbb65dff9baec","name":"","scope":["96a1bf65b0361c8d"],"uncaught":false,"x":514.6666564941406,"y":1322.5,"wires":[["b20ed504160e56a2"]]},{"id":"b20ed504160e56a2","type":"ut-assert-success","z":"678153b1daa0529a","g":"3e2cbb65dff9baec","name":"","count":1,"x":939.6666564941406,"y":1322.5,"wires":[]},{"id":"0804f9de5cbb31b7","type":"ut-assert-failure","z":"678153b1daa0529a","g":"b2f1aafe54bf14d6","name":"","x":1146,"y":1153,"wires":[]},{"id":"ef0862b998bd51e6","type":"ut-assert-failure","z":"678153b1daa0529a","g":"3e2cbb65dff9baec","name":"","x":1159,"y":1397.8125,"wires":[]},{"id":"c5616edc3d68cf06","type":"ut-assert-failure","z":"678153b1daa0529a","g":"b7e1e4d9d98ef1bb","name":"","x":1150,"y":308,"wires":[]},{"id":"6a4bfef352350b72","type":"ut-assert-failure","z":"678153b1daa0529a","g":"7ed7a1dc7f44409a","name":"","x":1186,"y":569.625,"wires":[]},{"id":"e56ffd82b2beaec5","type":"ut-assert-values","z":"678153b1daa0529a","g":"ae831a2255a48b68","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"debug.nodeid","pt":"msg","t":"eql","to":"43921beebe749863","tot":"str"},{"p":"payload['level']","pt":"msg","t":"eql","to":"20","tot":"num"},{"p":"payload.msg.error_msg","pt":"msg","t":"eql","to":"unexpected exit","tot":"str"},{"p":"payload.name","pt":"msg","t":"eql","to":"divide by zero causes an exception","tot":"str"}],"x":1131,"y":1702,"wires":[[]]},{"id":"eb33aab579f867c1","type":"ut-assert-values","z":"678153b1daa0529a","g":"5bd563066938c2f3","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"debug.nodeid","pt":"msg","t":"eql","to":"c2dc81f0f379b496","tot":"str"},{"p":"payload['level']","pt":"msg","t":"eql","to":"20","tot":"num"},{"p":"payload.msg.error_msg","pt":"msg","t":"eql","to":"unexpected exit","tot":"str"},{"p":"payload.name","pt":"msg","t":"eql","to":"divide by zero causes an exception","tot":"str"}],"x":1142,"y":894,"wires":[[]]}]
|
|
1
|
+
[{"id":"678153b1daa0529a","type":"tab","label":"[function] divide by zero throws kills node","disabled":false,"info":"## Function node and exceptions\n\nWhat happens if the function node raises an exception?\n\nThere are three cases to be considered:\n\n- <a class=\"ahl-group-only\" data-ids=\"b7e1e4d9d98ef1bb\">function node is under supervision</a>,\n- <a class=\"ahl-group-only\" data-ids=\"7ed7a1dc7f44409a\">function node is being caught</a> and\n- <a class=\"ahl-group-only\" data-ids=\"5bd563066938c2f3\">function node is neither</a>.\n\nThis is also the case for a <a class=\"ahl-group-only\" data-ids=\"e49cae74aca6e4aa\">time out exception</a> - if the function takes too long and there is a timeout set, then an exception is raised.\n","env":[{"name":"ERED_NOT_EUNIT","value":"true","type":"bool"},{"name":"ERED_TIMEOUT","value":"8","type":"num"},{"name":"ERED_ONLY","value":"true","type":"bool"}]},{"id":"e49cae74aca6e4aa","type":"group","z":"678153b1daa0529a","name":"time out exception","style":{"label":true},"nodes":["b2f1aafe54bf14d6","ae831a2255a48b68","3e2cbb65dff9baec"],"x":167.66665649414062,"y":1010,"w":1113.3333435058594,"h":759},{"id":"7d829222d2ef7ab2","type":"group","z":"678153b1daa0529a","name":"divide by zero exception","style":{"label":true},"nodes":["b7e1e4d9d98ef1bb","5bd563066938c2f3","7ed7a1dc7f44409a"],"x":168,"y":164,"w":1140,"h":797},{"id":"b7e1e4d9d98ef1bb","type":"group","z":"678153b1daa0529a","g":"7d829222d2ef7ab2","name":"no exception is raised if function is being supervised","style":{"label":true},"nodes":["e1926e702f82036d","0b270a75f19fe296","a7e6e47b5451fe98","f70d171602a22ea0","056c5807789fdd9f","a3c2a780a47683fa","25f64d67311491f0","c5616edc3d68cf06"],"x":199,"y":190,"w":1047,"h":217.125},{"id":"5bd563066938c2f3","type":"group","z":"678153b1daa0529a","g":"7d829222d2ef7ab2","name":"exception posted to the debug panel if exception not caught and function node not being supervised","style":{"label":true},"nodes":["2acfd9b89aa5a4f0","c2dc81f0f379b496","0610dfd55a620cd5","d36a8aa22bce4662","eb33aab579f867c1"],"x":194,"y":731,"w":1054,"h":204},{"id":"7ed7a1dc7f44409a","type":"group","z":"678153b1daa0529a","g":"7d829222d2ef7ab2","name":"if exception is caught, no debug message and the catch node handles it","style":{"label":true},"nodes":["1064a20a70a4d159","cbbdca5f81537d51","94f0dace67bcab25","714c969b3b036080","a7747cea4a1b7ac5","c35fef31f0dec2c7","6a4bfef352350b72"],"x":196,"y":452.5,"w":1086,"h":235.5},{"id":"b2f1aafe54bf14d6","type":"group","z":"678153b1daa0529a","g":"e49cae74aca6e4aa","name":"no exception is raised if function is being supervised","style":{"label":true},"nodes":["8c0d2959be4c8449","7c60e8efbf36cfb2","2bad596c31c9614c","478f54839df11249","5210bb11cbfd8184","637da1e5ea2fa8d2","8e15d37d50603cbe","0804f9de5cbb31b7"],"x":193.66665649414062,"y":1036,"w":1048.3333435058594,"h":217.125},{"id":"ae831a2255a48b68","type":"group","z":"678153b1daa0529a","g":"e49cae74aca6e4aa","name":"exception posted to the debug panel if exception not caught and function node not being supervised","style":{"label":true},"nodes":["e6bad32c2babea2d","43921beebe749863","247105e3e1174886","576520af1b49706d","e56ffd82b2beaec5"],"x":197.66665649414062,"y":1539,"w":1039.3333435058594,"h":204},{"id":"3e2cbb65dff9baec","type":"group","z":"678153b1daa0529a","g":"e49cae74aca6e4aa","name":"if exception is caught, no debug message and the catch node handles it","style":{"label":true},"nodes":["98af67622beba548","96a1bf65b0361c8d","6fd4f21bd30c0756","798d290779817374","0e5f5779ab066e4c","b20ed504160e56a2","ef0862b998bd51e6"],"x":195.66665649414062,"y":1281.5,"w":1059.3333435058594,"h":235.5},{"id":"e1926e702f82036d","type":"inject","z":"678153b1daa0529a","g":"b7e1e4d9d98ef1bb","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":305,"y":366.125,"wires":[["0b270a75f19fe296"]]},{"id":"0b270a75f19fe296","type":"function","z":"678153b1daa0529a","g":"b7e1e4d9d98ef1bb","name":"divide by zero causes an exception","func":"\n1 / 0","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":566,"y":366.125,"wires":[["f70d171602a22ea0"]]},{"id":"a7e6e47b5451fe98","type":"catch","z":"678153b1daa0529a","g":"b7e1e4d9d98ef1bb","name":"","scope":["0b270a75f19fe296"],"uncaught":false,"x":518,"y":239,"wires":[["a3c2a780a47683fa"]]},{"id":"f70d171602a22ea0","type":"ut-assert-failure","z":"678153b1daa0529a","g":"b7e1e4d9d98ef1bb","name":"","x":990,"y":366.125,"wires":[]},{"id":"056c5807789fdd9f","type":"erlsupervisor","z":"678153b1daa0529a","g":"b7e1e4d9d98ef1bb","name":"","scope":["0b270a75f19fe296"],"supervisor_type":"static","strategy":"one_for_one","auto_shutdown":"never","intensity":"1","period":"5","child_type":"worker","child_restart":"permanent","child_shutdown":"brutal_kill","child_shutdown_timeout":"0","x":327,"y":241.5,"wires":[[]]},{"id":"2acfd9b89aa5a4f0","type":"inject","z":"678153b1daa0529a","g":"5bd563066938c2f3","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":300,"y":772,"wires":[["c2dc81f0f379b496"]]},{"id":"c2dc81f0f379b496","type":"function","z":"678153b1daa0529a","g":"5bd563066938c2f3","name":"divide by zero causes an exception","func":"1 / 0","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":598,"y":829.75,"wires":[["0610dfd55a620cd5"]]},{"id":"0610dfd55a620cd5","type":"ut-assert-failure","z":"678153b1daa0529a","g":"5bd563066938c2f3","name":"","x":978,"y":829.75,"wires":[]},{"id":"d36a8aa22bce4662","type":"ut-assert-debug","z":"678153b1daa0529a","g":"5bd563066938c2f3","name":"","scope":["c2dc81f0f379b496"],"nodeid":"c2dc81f0f379b496","msgtype":"error","inverse":false,"x":664,"y":894,"wires":[["eb33aab579f867c1"]]},{"id":"a3c2a780a47683fa","type":"ut-assert-failure","z":"678153b1daa0529a","g":"b7e1e4d9d98ef1bb","name":"","x":827,"y":307,"wires":[]},{"id":"1064a20a70a4d159","type":"inject","z":"678153b1daa0529a","g":"7ed7a1dc7f44409a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":302,"y":569.625,"wires":[["cbbdca5f81537d51"]]},{"id":"cbbdca5f81537d51","type":"function","z":"678153b1daa0529a","g":"7ed7a1dc7f44409a","name":"divide by zero causes an exception","func":"1 / 0","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":562,"y":569.625,"wires":[["94f0dace67bcab25"]]},{"id":"94f0dace67bcab25","type":"ut-assert-failure","z":"678153b1daa0529a","g":"7ed7a1dc7f44409a","name":"","x":890,"y":569.625,"wires":[]},{"id":"714c969b3b036080","type":"ut-assert-debug","z":"678153b1daa0529a","g":"7ed7a1dc7f44409a","name":"","scope":["cbbdca5f81537d51"],"nodeid":"cbbdca5f81537d51","msgtype":"error","inverse":true,"x":819,"y":647,"wires":[["6a4bfef352350b72"]]},{"id":"a7747cea4a1b7ac5","type":"catch","z":"678153b1daa0529a","g":"7ed7a1dc7f44409a","name":"","scope":["cbbdca5f81537d51"],"uncaught":false,"x":515,"y":493.5,"wires":[["c35fef31f0dec2c7"]]},{"id":"c35fef31f0dec2c7","type":"ut-assert-success","z":"678153b1daa0529a","g":"7ed7a1dc7f44409a","name":"","count":1,"x":940,"y":493.5,"wires":[]},{"id":"25f64d67311491f0","type":"ut-assert-debug","z":"678153b1daa0529a","g":"b7e1e4d9d98ef1bb","name":"","scope":["0b270a75f19fe296"],"nodeid":"0b270a75f19fe296","msgtype":"error","inverse":true,"x":882,"y":231,"wires":[["c5616edc3d68cf06"]]},{"id":"8c0d2959be4c8449","type":"inject","z":"678153b1daa0529a","g":"b2f1aafe54bf14d6","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":299.6666564941406,"y":1212.125,"wires":[["7c60e8efbf36cfb2"]]},{"id":"7c60e8efbf36cfb2","type":"function","z":"678153b1daa0529a","g":"b2f1aafe54bf14d6","name":"divide by zero causes an exception","func":"\ntimer:sleep(5_000)","outputs":1,"timeout":"1","noerr":0,"initialize":"","finalize":"","libs":[],"x":560.6666564941406,"y":1212.125,"wires":[["478f54839df11249"]]},{"id":"2bad596c31c9614c","type":"catch","z":"678153b1daa0529a","g":"b2f1aafe54bf14d6","name":"","scope":["7c60e8efbf36cfb2"],"uncaught":false,"x":512.6666564941406,"y":1085,"wires":[["637da1e5ea2fa8d2"]]},{"id":"478f54839df11249","type":"ut-assert-failure","z":"678153b1daa0529a","g":"b2f1aafe54bf14d6","name":"","x":984.6666564941406,"y":1212.125,"wires":[]},{"id":"5210bb11cbfd8184","type":"erlsupervisor","z":"678153b1daa0529a","g":"b2f1aafe54bf14d6","name":"","scope":["7c60e8efbf36cfb2"],"supervisor_type":"static","strategy":"one_for_one","auto_shutdown":"never","intensity":"1","period":"5","child_type":"worker","child_restart":"permanent","child_shutdown":"brutal_kill","child_shutdown_timeout":"0","x":321.6666564941406,"y":1087.5,"wires":[[]]},{"id":"637da1e5ea2fa8d2","type":"ut-assert-failure","z":"678153b1daa0529a","g":"b2f1aafe54bf14d6","name":"","x":821.6666564941406,"y":1153,"wires":[]},{"id":"8e15d37d50603cbe","type":"ut-assert-debug","z":"678153b1daa0529a","g":"b2f1aafe54bf14d6","name":"","scope":["7c60e8efbf36cfb2"],"nodeid":"7c60e8efbf36cfb2","msgtype":"error","inverse":true,"x":876.6666564941406,"y":1077,"wires":[["0804f9de5cbb31b7"]]},{"id":"e6bad32c2babea2d","type":"inject","z":"678153b1daa0529a","g":"ae831a2255a48b68","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":303.6666564941406,"y":1580,"wires":[["43921beebe749863"]]},{"id":"43921beebe749863","type":"function","z":"678153b1daa0529a","g":"ae831a2255a48b68","name":"divide by zero causes an exception","func":"timer:sleep(5_000)","outputs":1,"timeout":"1","noerr":0,"initialize":"","finalize":"","libs":[],"x":601.6666564941406,"y":1637.75,"wires":[["247105e3e1174886"]]},{"id":"247105e3e1174886","type":"ut-assert-failure","z":"678153b1daa0529a","g":"ae831a2255a48b68","name":"","x":981.6666564941406,"y":1637.75,"wires":[]},{"id":"576520af1b49706d","type":"ut-assert-debug","z":"678153b1daa0529a","g":"ae831a2255a48b68","name":"","scope":["43921beebe749863"],"nodeid":"43921beebe749863","msgtype":"error","inverse":false,"x":667.6666564941406,"y":1702,"wires":[["e56ffd82b2beaec5"]]},{"id":"98af67622beba548","type":"inject","z":"678153b1daa0529a","g":"3e2cbb65dff9baec","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":301.6666564941406,"y":1397.8125,"wires":[["96a1bf65b0361c8d"]]},{"id":"96a1bf65b0361c8d","type":"function","z":"678153b1daa0529a","g":"3e2cbb65dff9baec","name":"divide by zero causes an exception","func":"timer:sleep(5_000)","outputs":1,"timeout":"1","noerr":0,"initialize":"","finalize":"","libs":[],"x":561.6666564941406,"y":1397.8125,"wires":[["6fd4f21bd30c0756"]]},{"id":"6fd4f21bd30c0756","type":"ut-assert-failure","z":"678153b1daa0529a","g":"3e2cbb65dff9baec","name":"","x":889.6666564941406,"y":1397.8125,"wires":[]},{"id":"798d290779817374","type":"ut-assert-debug","z":"678153b1daa0529a","g":"3e2cbb65dff9baec","name":"","scope":["96a1bf65b0361c8d"],"nodeid":"96a1bf65b0361c8d","msgtype":"error","inverse":true,"x":818.6666564941406,"y":1476,"wires":[["ef0862b998bd51e6"]]},{"id":"0e5f5779ab066e4c","type":"catch","z":"678153b1daa0529a","g":"3e2cbb65dff9baec","name":"","scope":["96a1bf65b0361c8d"],"uncaught":false,"x":514.6666564941406,"y":1322.5,"wires":[["b20ed504160e56a2"]]},{"id":"b20ed504160e56a2","type":"ut-assert-success","z":"678153b1daa0529a","g":"3e2cbb65dff9baec","name":"","count":1,"x":939.6666564941406,"y":1322.5,"wires":[]},{"id":"0804f9de5cbb31b7","type":"ut-assert-failure","z":"678153b1daa0529a","g":"b2f1aafe54bf14d6","name":"","x":1146,"y":1153,"wires":[]},{"id":"ef0862b998bd51e6","type":"ut-assert-failure","z":"678153b1daa0529a","g":"3e2cbb65dff9baec","name":"","x":1159,"y":1397.8125,"wires":[]},{"id":"c5616edc3d68cf06","type":"ut-assert-failure","z":"678153b1daa0529a","g":"b7e1e4d9d98ef1bb","name":"","x":1150,"y":308,"wires":[]},{"id":"6a4bfef352350b72","type":"ut-assert-failure","z":"678153b1daa0529a","g":"7ed7a1dc7f44409a","name":"","x":1186,"y":569.625,"wires":[]},{"id":"e56ffd82b2beaec5","type":"ut-assert-values","z":"678153b1daa0529a","g":"ae831a2255a48b68","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"data.id","pt":"msg","to":"43921beebe749863","tot":"str"},{"t":"eql","p":"data['level']","pt":"msg","to":"20","tot":"num"},{"t":"eql","p":"data.msg.error_msg","pt":"msg","to":"unexpected exit","tot":"str"},{"t":"eql","p":"data.name","pt":"msg","to":"divide by zero causes an exception","tot":"str"}],"x":1131,"y":1702,"wires":[[]]},{"id":"eb33aab579f867c1","type":"ut-assert-values","z":"678153b1daa0529a","g":"5bd563066938c2f3","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"data.id","pt":"msg","to":"c2dc81f0f379b496","tot":"str"},{"t":"eql","p":"data['level']","pt":"msg","to":"20","tot":"num"},{"t":"eql","p":"data.msg.error_msg","pt":"msg","to":"unexpected exit","tot":"str"},{"t":"eql","p":"data.name","pt":"msg","to":"divide by zero causes an exception","tot":"str"}],"x":1142,"y":894,"wires":[[]]}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"id":"dbc618ad5f0210bb","type":"tab","label":"[function] ensure \"on stop\" code is executed","disabled":false,"info":"## Function nodes can be stopped often\n\nEnsure that the on stop code is executed each time.\n\nThis is particular the case if the node is being supervised by a supervisor node.","env":[{"name":"ERED_PENDING","value":"true","type":"bool"}]},{"id":"eb66387c50c14a04","type":"inject","z":"dbc618ad5f0210bb","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":241,"y":625,"wires":[[]]},{"id":"81b2e5465a3b39d5","type":"function","z":"dbc618ad5f0210bb","name":"function 5","func":"%% Code here is wrapped in a fun (Msg) call\n%% fun (Msg) ->\n Msg\n%% end.\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":362,"y":862,"wires":[[]]},{"id":"6abf10a6ebdc0518","type":"erlsupervisor","z":"dbc618ad5f0210bb","name":"","scope":["81b2e5465a3b39d5"],"supervisor_type":"static","strategy":"one_for_one","auto_shutdown":"never","intensity":"1","period":"5","child_type":"worker","child_restart":"permanent","child_shutdown":"brutal_kill","child_shutdown_timeout":"0","x":443,"y":702.5,"wires":[[]]}]
|
|
1
|
+
[{"id":"dbc618ad5f0210bb","type":"tab","label":"[function] ensure \"on stop\" code is executed","disabled":false,"info":"## Function nodes can be stopped often\n\nEnsure that the on stop code is executed each time.\n\nThis is particular the case if the node is being supervised by a supervisor node.","env":[{"name":"ERED_PENDING","value":"true","type":"bool"},{"name":"ERED_ONLY","value":"true","type":"bool"}]},{"id":"eb66387c50c14a04","type":"inject","z":"dbc618ad5f0210bb","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":241,"y":625,"wires":[[]]},{"id":"81b2e5465a3b39d5","type":"function","z":"dbc618ad5f0210bb","name":"function 5","func":"%% Code here is wrapped in a fun (Msg) call\n%% fun (Msg) ->\n Msg\n%% end.\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":362,"y":862,"wires":[[]]},{"id":"6abf10a6ebdc0518","type":"erlsupervisor","z":"dbc618ad5f0210bb","name":"","scope":["81b2e5465a3b39d5"],"supervisor_type":"static","strategy":"one_for_one","auto_shutdown":"never","intensity":"1","period":"5","child_type":"worker","child_restart":"permanent","child_shutdown":"brutal_kill","child_shutdown_timeout":"0","x":443,"y":702.5,"wires":[[]]}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"id":"442b3bf0d630e21d","type":"tab","label":"[function] function and module work together","disabled":false,"info":"## Function & Module = Working\n\nEnsure that a module can be defined in a module and then be used in a function node.\n\n## Module node\n\nA module node can be used to defined a complete Erlang module, i.e., something like \n\n```erlang\n-module(ered_http_nodered_inject_node_button_handler).\n\n-behaviour(cowboy_rest).\n\n-export([\n init/2,\n allowed_methods/2,\n content_types_accepted/2,\n handle_json_body/2,\n format_error/2\n]).\n\n-import(ered_nodes, [\n nodeid_to_pid/2\n]).\n-import(ered_nodered_comm, [\n websocket_name_from_request/1\n]).\n-import(ered_messages, [\n create_outgoing_msg/1\n]).\n\ninit(Req, State) ->\n {cowboy_rest, Req, State}.\n\nallowed_methods(Req, State) ->\n {[<<\"POST\">>], Req, State}.\n\ncontent_types_accepted(Req, State) ->\n {\n [\n {<<\"application/json\">>, handle_json_body},\n {<<\"application/json; charset=utf-8\">>, handle_json_body}\n ],\n Req,\n State\n }.\n\nhandle_json_body(Req, State) ->\n Resp = cowboy_req:set_resp_body(<<\"OK\">>, Req),\n WsName = websocket_name_from_request(Req),\n\n case cowboy_req:binding(nodeid, Req) of\n undefined ->\n ok;\n IdStr ->\n case nodeid_to_pid(WsName, IdStr) of\n {ok, Pid} ->\n gen_server:cast(Pid, create_outgoing_msg(WsName));\n {error, _} ->\n ignore\n end\n end,\n\n {true, Resp, State}.\n\nformat_error(Reason, Req) ->\n {\n [\n {<<\"error\">>, <<\"bad_request\">>},\n {<<\"reason\">>, Reason}\n ],\n Req\n }.\n```\n\ncan be defined in the module node and used in the functon node.\n\n## Code updates\n\nModule code is reload each time the flow is deployed to the server, thus updates to the module are immediately available on the server.\n\nThe advantage is that all code related to the application can be stored in the flow data and organised as a flow.","env":[]},{"id":"c4efa06c8868a6ac","type":"erlmodule","z":"442b3bf0d630e21d","name":"","module_name":"erlang_red_test_module_add","code":"-module(erlang_red_test_module_add).\n\n-export([add/2]).\n\nadd(V1,V2) when is_number(V1), is_number(V2) ->\n V1 + V2;\nadd(_,_) ->\n infinity.\n\n","x":218,"y":98,"wires":[]},{"id":"f11048ace112cc59","type":"erlmodule","z":"442b3bf0d630e21d","name":"","module_name":"erlang_red_test_module_subtract","code":"-module(erlang_red_test_module_subtract).\n\n-export([subtract/2]).\n\nsubtract(V1,V2) when is_number(V1), is_number(V2) ->\n V1 - V2;\nsubtract(_,_) ->\n infinity.\n\n","x":232,"y":152,"wires":[]},{"id":"bcee04fb6846c14a","type":"function","z":"442b3bf0d630e21d","name":"function 1","func":"Msg#{ <<\"payload\">> => erlang_red_test_module_add:add(maps:get(<<\"payload\">>,Msg), maps:get(<<\"value2\">>,Msg)) }\n\n","outputs":1,"timeout":0,"noerr":
|
|
1
|
+
[{"id":"442b3bf0d630e21d","type":"tab","label":"[function] function and module work together","disabled":false,"info":"## Function & Module = Working\n\nEnsure that a module can be defined in a module and then be used in a function node.\n\n## Module node\n\nA module node can be used to defined a complete Erlang module, i.e., something like \n\n```erlang\n-module(ered_http_nodered_inject_node_button_handler).\n\n-behaviour(cowboy_rest).\n\n-export([\n init/2,\n allowed_methods/2,\n content_types_accepted/2,\n handle_json_body/2,\n format_error/2\n]).\n\n-import(ered_nodes, [\n nodeid_to_pid/2\n]).\n-import(ered_nodered_comm, [\n websocket_name_from_request/1\n]).\n-import(ered_messages, [\n create_outgoing_msg/1\n]).\n\ninit(Req, State) ->\n {cowboy_rest, Req, State}.\n\nallowed_methods(Req, State) ->\n {[<<\"POST\">>], Req, State}.\n\ncontent_types_accepted(Req, State) ->\n {\n [\n {<<\"application/json\">>, handle_json_body},\n {<<\"application/json; charset=utf-8\">>, handle_json_body}\n ],\n Req,\n State\n }.\n\nhandle_json_body(Req, State) ->\n Resp = cowboy_req:set_resp_body(<<\"OK\">>, Req),\n WsName = websocket_name_from_request(Req),\n\n case cowboy_req:binding(nodeid, Req) of\n undefined ->\n ok;\n IdStr ->\n case nodeid_to_pid(WsName, IdStr) of\n {ok, Pid} ->\n gen_server:cast(Pid, create_outgoing_msg(WsName));\n {error, _} ->\n ignore\n end\n end,\n\n {true, Resp, State}.\n\nformat_error(Reason, Req) ->\n {\n [\n {<<\"error\">>, <<\"bad_request\">>},\n {<<\"reason\">>, Reason}\n ],\n Req\n }.\n```\n\ncan be defined in the module node and used in the functon node.\n\n## Code updates\n\nModule code is reload each time the flow is deployed to the server, thus updates to the module are immediately available on the server.\n\nThe advantage is that all code related to the application can be stored in the flow data and organised as a flow.","env":[{"name":"ERED_ONLY","value":"true","type":"bool"}]},{"id":"c4efa06c8868a6ac","type":"erlmodule","z":"442b3bf0d630e21d","name":"","module_name":"erlang_red_test_module_add","code":"-module(erlang_red_test_module_add).\n\n-export([add/2]).\n\nadd(V1,V2) when is_number(V1), is_number(V2) ->\n V1 + V2;\nadd(_,_) ->\n infinity.\n\n","x":218,"y":98,"wires":[]},{"id":"f11048ace112cc59","type":"erlmodule","z":"442b3bf0d630e21d","name":"","module_name":"erlang_red_test_module_subtract","code":"-module(erlang_red_test_module_subtract).\n\n-export([subtract/2]).\n\nsubtract(V1,V2) when is_number(V1), is_number(V2) ->\n V1 - V2;\nsubtract(_,_) ->\n infinity.\n\n","x":232,"y":152,"wires":[]},{"id":"bcee04fb6846c14a","type":"function","z":"442b3bf0d630e21d","name":"function 1","func":"Msg#{ <<\"payload\">> => erlang_red_test_module_add:add(maps:get(<<\"payload\">>,Msg), maps:get(<<\"value2\">>,Msg)) }\n\n","outputs":1,"timeout":0,"noerr":23,"initialize":"","finalize":"","libs":[],"x":297,"y":531,"wires":[["9a932875c4eed899","beb2768ba33c85f3"]]},{"id":"aeedbfdc6212b89d","type":"inject","z":"442b3bf0d630e21d","name":"","props":[{"p":"payload"},{"p":"value2","v":"231","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"111","payloadType":"num","x":132,"y":427,"wires":[["bcee04fb6846c14a","0d5e040ea5a93d79"]]},{"id":"ac8cac1caf6a3507","type":"ut-assert-values","z":"442b3bf0d630e21d","name":"","rules":[{"p":"payload","pt":"msg","t":"eql","to":"-2033","tot":"num"}],"x":899,"y":657.5,"wires":[[]]},{"id":"9a932875c4eed899","type":"function","z":"442b3bf0d630e21d","name":"function 2","func":"Msg#{ <<\"payload\">> => erlang_red_test_module_subtract:subtract(maps:get(<<\"payload\">>,Msg), 1243) }\n\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":490,"y":635,"wires":[["8d5da91051689370","b3e32834498fdc02"]]},{"id":"8d5da91051689370","type":"function","z":"442b3bf0d630e21d","name":"function 3","func":"Msg#{ <<\"payload\">> => erlang_red_test_module_add:add(\n erlang_red_test_module_subtract:subtract(\n maps:get(<<\"payload\">>, Msg), \n 1243\n ), \n 111) \n}\n\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":665,"y":744,"wires":[["ac8cac1caf6a3507"]]},{"id":"b3e32834498fdc02","type":"ut-assert-values","z":"442b3bf0d630e21d","name":"","rules":[{"p":"payload","pt":"msg","t":"eql","to":"-901","tot":"num"}],"x":759,"y":541,"wires":[[]]},{"id":"beb2768ba33c85f3","type":"ut-assert-values","z":"442b3bf0d630e21d","name":"","rules":[{"p":"payload","pt":"msg","t":"eql","to":"342","tot":"num"}],"x":592,"y":428,"wires":[[]]},{"id":"0d5e040ea5a93d79","type":"ut-assert-values","z":"442b3bf0d630e21d","name":"","rules":[{"p":"payload","pt":"msg","t":"eql","to":"111","tot":"num"}],"x":429,"y":295,"wires":[[]]}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"id":"13e6f82c8b9d1ff9","type":"tab","label":"[function] handle corrupt code","disabled":false,"info":"## Incorrect code handling\n\nEither the \"On Start\", \"On Stop\" or \"On Message\" tab code could be incorrect - handle that.\n","env":[{"name":"ERED_ONLY","value":"true","type":"bool"}]},{"id":"d91de7d1dc574185","type":"function","z":"13e6f82c8b9d1ff9","name":"On start function is broken","func":"%% Code here is wrapped in a fun (Msg) call\n%% fun (Msg) ->\n Msg\n%% end.\n","outputs":1,"timeout":0,"noerr":22,"initialize":"this code is broken","finalize":"","libs":[],"x":975.9999999999998,"y":903.9999999999998,"wires":[[]]},{"id":"ad590754b9e5860b","type":"inject","z":"13e6f82c8b9d1ff9","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":743,"y":853,"wires":[["d91de7d1dc574185"]]},{"id":"745cdff42a7f4a94","type":"ut-assert-debug","z":"13e6f82c8b9d1ff9","name":"","scope":["d91de7d1dc574185"],"nodeid":"d91de7d1dc574185","msgtype":"error","inverse":false,"x":929,"y":981.5,"wires":[["a5c4071c894817c8"]]},{"id":"499082d6c1e813a5","type":"function","z":"13e6f82c8b9d1ff9","name":"On message code is broken","func":"this code is broken","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":954,"y":1162,"wires":[[]]},{"id":"4e5d7ec31ac4fc81","type":"inject","z":"13e6f82c8b9d1ff9","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":725.0000000000002,"y":1111.0000000000002,"wires":[["499082d6c1e813a5"]]},{"id":"9a322bb94698aba1","type":"ut-assert-debug","z":"13e6f82c8b9d1ff9","name":"","scope":["499082d6c1e813a5"],"nodeid":"499082d6c1e813a5","msgtype":"error","inverse":false,"x":898.0000000000002,"y":1227.5000000000002,"wires":[["8010146b02a11c7a"]]},{"id":"bfdf612d581c6537","type":"function","z":"13e6f82c8b9d1ff9","name":"On stop code is broken","func":"%% non empty code","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"this code is broken","libs":[],"x":966,"y":1457,"wires":[[]]},{"id":"d2cdf70515beea42","type":"inject","z":"13e6f82c8b9d1ff9","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":747.0000000000002,"y":1406.0000000000002,"wires":[["bfdf612d581c6537"]]},{"id":"87d341bd9941f17b","type":"ut-assert-debug","z":"13e6f82c8b9d1ff9","name":"","scope":["bfdf612d581c6537"],"nodeid":"499082d6c1e813a5","msgtype":"error","inverse":false,"x":900.0000000000002,"y":1522.5000000000002,"wires":[["16a684a6a6a4c1b9"]]},{"id":"64af25711170b21d","type":"function","z":"13e6f82c8b9d1ff9","name":"On message code is empty","func":"","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1524,"y":1165,"wires":[[]]},{"id":"b840d4345d9cf807","type":"inject","z":"13e6f82c8b9d1ff9","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1295.0000000000002,"y":1114.0000000000002,"wires":[["64af25711170b21d"]]},{"id":"95ddd111838b531f","type":"ut-assert-debug","z":"13e6f82c8b9d1ff9","name":"","scope":["64af25711170b21d"],"nodeid":"499082d6c1e813a5","msgtype":"error","inverse":false,"x":1458.0000000000002,"y":1230.5000000000002,"wires":[["41f3b0a796fb5791","da11bba1cc74cd57"]]},{"id":"41f3b0a796fb5791","type":"ClientCode","z":"13e6f82c8b9d1ff9","name":"","clientcode":"console.log(msg)\nlet ary = Object.keys(msg).map( d => {\n return [d, msg[d]]\n})\n\nconsole.log(ary)\n\nnode.send(msg)","format":"javascript","x":1852,"y":1304,"wires":[[]]},{"id":"a5c4071c894817c8","type":"ut-assert-values","z":"13e6f82c8b9d1ff9","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"
|
|
1
|
+
[{"id":"13e6f82c8b9d1ff9","type":"tab","label":"[function] handle corrupt code","disabled":false,"info":"## Incorrect code handling\n\nEither the \"On Start\", \"On Stop\" or \"On Message\" tab code could be incorrect - handle that.\n","env":[{"name":"ERED_ONLY","value":"true","type":"bool"}]},{"id":"d91de7d1dc574185","type":"function","z":"13e6f82c8b9d1ff9","name":"On start function is broken","func":"%% Code here is wrapped in a fun (Msg) call\n%% fun (Msg) ->\n Msg\n%% end.\n","outputs":1,"timeout":0,"noerr":22,"initialize":"this code is broken","finalize":"","libs":[],"x":975.9999999999998,"y":903.9999999999998,"wires":[[]]},{"id":"ad590754b9e5860b","type":"inject","z":"13e6f82c8b9d1ff9","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":743,"y":853,"wires":[["d91de7d1dc574185"]]},{"id":"745cdff42a7f4a94","type":"ut-assert-debug","z":"13e6f82c8b9d1ff9","name":"","scope":["d91de7d1dc574185"],"nodeid":"d91de7d1dc574185","msgtype":"error","inverse":false,"x":929,"y":981.5,"wires":[["a5c4071c894817c8"]]},{"id":"499082d6c1e813a5","type":"function","z":"13e6f82c8b9d1ff9","name":"On message code is broken","func":"this code is broken","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":954,"y":1162,"wires":[[]]},{"id":"4e5d7ec31ac4fc81","type":"inject","z":"13e6f82c8b9d1ff9","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":725.0000000000002,"y":1111.0000000000002,"wires":[["499082d6c1e813a5"]]},{"id":"9a322bb94698aba1","type":"ut-assert-debug","z":"13e6f82c8b9d1ff9","name":"","scope":["499082d6c1e813a5"],"nodeid":"499082d6c1e813a5","msgtype":"error","inverse":false,"x":898.0000000000002,"y":1227.5000000000002,"wires":[["8010146b02a11c7a"]]},{"id":"bfdf612d581c6537","type":"function","z":"13e6f82c8b9d1ff9","name":"On stop code is broken","func":"%% non empty code","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"this code is broken","libs":[],"x":966,"y":1457,"wires":[[]]},{"id":"d2cdf70515beea42","type":"inject","z":"13e6f82c8b9d1ff9","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":747.0000000000002,"y":1406.0000000000002,"wires":[["bfdf612d581c6537"]]},{"id":"87d341bd9941f17b","type":"ut-assert-debug","z":"13e6f82c8b9d1ff9","name":"","scope":["bfdf612d581c6537"],"nodeid":"499082d6c1e813a5","msgtype":"error","inverse":false,"x":900.0000000000002,"y":1522.5000000000002,"wires":[["16a684a6a6a4c1b9"]]},{"id":"64af25711170b21d","type":"function","z":"13e6f82c8b9d1ff9","name":"On message code is empty","func":"","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1524,"y":1165,"wires":[[]]},{"id":"b840d4345d9cf807","type":"inject","z":"13e6f82c8b9d1ff9","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1295.0000000000002,"y":1114.0000000000002,"wires":[["64af25711170b21d"]]},{"id":"95ddd111838b531f","type":"ut-assert-debug","z":"13e6f82c8b9d1ff9","name":"","scope":["64af25711170b21d"],"nodeid":"499082d6c1e813a5","msgtype":"error","inverse":false,"x":1458.0000000000002,"y":1230.5000000000002,"wires":[["41f3b0a796fb5791","da11bba1cc74cd57"]]},{"id":"41f3b0a796fb5791","type":"ClientCode","z":"13e6f82c8b9d1ff9","name":"","clientcode":"console.log(msg)\nlet ary = Object.keys(msg).map( d => {\n return [d, msg[d]]\n})\n\nconsole.log(ary)\n\nnode.send(msg)","format":"javascript","x":1852,"y":1304,"wires":[[]]},{"id":"a5c4071c894817c8","type":"ut-assert-values","z":"13e6f82c8b9d1ff9","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"data['level']","pt":"msg","to":"20","tot":"num"},{"t":"eql","p":"data.id","pt":"msg","to":"d91de7d1dc574185","tot":"str"},{"t":"eql","p":"data.format","pt":"msg","to":"error","tot":"str"}],"x":1296,"y":940,"wires":[[]]},{"id":"8010146b02a11c7a","type":"ut-assert-values","z":"13e6f82c8b9d1ff9","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"data['level']","pt":"msg","to":"20","tot":"num"},{"t":"eql","p":"data.id","pt":"msg","to":"499082d6c1e813a5","tot":"str"},{"t":"eql","p":"data.format","pt":"msg","to":"error","tot":"str"}],"x":1221,"y":1187,"wires":[[]]},{"id":"da11bba1cc74cd57","type":"ut-assert-values","z":"13e6f82c8b9d1ff9","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"data['level']","pt":"msg","to":"20","tot":"num"},{"t":"eql","p":"data.id","pt":"msg","to":"64af25711170b21d","tot":"str"},{"t":"eql","p":"data.format","pt":"msg","to":"error","tot":"str"}],"x":1845,"y":1212,"wires":[[]]},{"id":"16a684a6a6a4c1b9","type":"ut-assert-values","z":"13e6f82c8b9d1ff9","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"data['level']","pt":"msg","to":"20","tot":"num"},{"t":"eql","p":"data.id","pt":"msg","to":"bfdf612d581c6537","tot":"str"},{"t":"eql","p":"data.format","pt":"msg","to":"error","tot":"str"}],"x":1331,"y":1456,"wires":[[]]}]
|