@gregoriusrippenstein/erlang-red-unittest 0.20.1 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/examples/.core/support JS hash naming in variable access.json +1 -0
- package/examples/.elixir/support basic module code.json +1 -0
- package/examples/.jsonata/$privdir operator.json +1 -0
- package/examples/.jsonata/$replace should be working for newlines.json +1 -0
- package/examples/.jsonata/$type operator.json +1 -0
- package/examples/.jsonata/ensure that $millis() works.json +1 -0
- package/examples/.jsonata/non-string key names.json +1 -0
- package/examples/.jsonata/split function.json +1 -0
- package/examples/.jsonata/support array definition.json +1 -0
- package/examples/batch/basic behaviour.json +1 -0
- package/examples/binary/initial test.json +1 -0
- package/examples/binary/parse PNG image data.json +1 -0
- package/examples/captureio/Capture io from function node.json +1 -0
- package/examples/captureio/Mutliple captures.json +1 -0
- package/examples/captureio/capture io from gen_server behaviour.json +1 -0
- package/examples/captureio/collect io from event handlers.json +1 -0
- package/examples/captureio/collect io from state machine node.json +1 -0
- package/examples/catch/catch all exceptions in a single group.json +1 -0
- package/examples/catch/catch all in group except those handler elsewhere.json +1 -0
- package/examples/catch/deal with it yourself.json +1 -0
- package/examples/catch/don't catch if the node isn't selected.json +1 -0
- package/examples/change/debug message if no catch node.json +1 -0
- package/examples/change/set functionality.json +1 -0
- package/examples/change/support buffer type.json +1 -0
- package/examples/change/support num types.json +1 -0
- package/examples/change/support underscores in binary, hex & octal values.json +1 -0
- package/examples/clientcode/Client code node test.json +1 -0
- package/examples/complete/avoid endless recursion.json +1 -0
- package/examples/complete/avoid recursion - test case 2.json +1 -0
- package/examples/complete/its complete nodes all the way down.json +1 -0
- package/examples/complete/split node.json +1 -0
- package/examples/complete/when is a join complete.json +1 -0
- package/examples/csv-decode/comma separated, parse numbers & msg per row.json +1 -0
- package/examples/csv-decode/separators other than comma.json +1 -0
- package/examples/csv-decode/single message for entire CSV, comma, RFC4180.json +1 -0
- package/examples/csv-decode/single message per line.json +1 -0
- package/examples/csv-decode/skip line happens before parsing content.json +1 -0
- package/examples/csv-encode/line termination and separator.json +1 -0
- package/examples/csv-encode/simple object.json +1 -0
- package/examples/debug/ensure debug messages are generated.json +1 -0
- package/examples/debug/handle largish json files as content.json +1 -0
- package/examples/debug/handling of Jsonata expressions.json +1 -0
- package/examples/debug/only debug specific property.json +1 -0
- package/examples/debug/status message counter.json +1 -0
- package/examples/debug/type hadling of JSONata reslults (ered).json +1 -0
- package/examples/debug/type hadling of JSONata reslults (node-red).json +1 -0
- package/examples/delay/delay messages by 5 seconds.json +1 -0
- package/examples/delay/delay multiple message for the same length of time.json +1 -0
- package/examples/delay/need to provide a status message of queue size.json +1 -0
- package/examples/eventhandler/handle kill exits.json +1 -0
- package/examples/eventhandler/handle normal exits.json +1 -0
- package/examples/eventhandler/multiple dynamic event handlers.json +1 -0
- package/examples/eventhandler/register and unregister handler.json +1 -0
- package/examples/eventhandler/static configuration.json +1 -0
- package/examples/eventhandler/static handler with arguments.json +1 -0
- package/examples/eventhandler/static handler: multiple instances.json +1 -0
- package/examples/eventhandler/used with a supervisor node.json +1 -0
- package/examples/exec/async with noisy command.json +1 -0
- package/examples/exec/empty commands are not supported.json +1 -0
- package/examples/exec/generate complete msg once command is done.json +1 -0
- package/examples/exec/handle multiple process at once.json +1 -0
- package/examples/exec/support timeout specification.json +1 -0
- package/examples/exec/synchronised execution.json +1 -0
- package/examples/file in/basic functionality of being able to read a file.json +1 -0
- package/examples/file in/error when file not found.json +1 -0
- package/examples/file in/warning if no file name is defined.json +1 -0
- package/examples/file in/will accept file name from msg obj.json +1 -0
- package/examples/filter/ignore initial value per topic.json +1 -0
- package/examples/filter/ignore initial value.json +1 -0
- package/examples/filter/post if value changed.json +1 -0
- package/examples/flowhubpull/retrieve flow id.json +1 -0
- package/examples/function/divide by zero throws kills node.json +1 -0
- package/examples/function/ensure /"on stop/" code is executed.json" +1 -0
- package/examples/function/function and module work together.json +1 -0
- package/examples/function/handle corrupt code.json +1 -0
- package/examples/function/return values are important.json +1 -0
- package/examples/function/set node context.json +1 -0
- package/examples/function/speaks Erlang.json +1 -0
- package/examples/function/supervisor interaction.json +1 -0
- package/examples/function/support multiple outputs.json +1 -0
- package/examples/function/support not returning a message.json +1 -0
- package/examples/function/support timeout setting.json +1 -0
- package/examples/function/supports completed node.json +1 -0
- package/examples/genserver/addressing modules.json +1 -0
- package/examples/genserver/triggering functionality.json +1 -0
- package/examples/http/Dynamic Routing.json +1 -0
- package/examples/http/POST & GET have different endpoints.json +1 -0
- package/examples/http/dynamic redirect.json +1 -0
- package/examples/http/have params in the path.json +1 -0
- package/examples/http/http static routing.json +1 -0
- package/examples/http/multiple endpoints don't all get the request.json +1 -0
- package/examples/http/nodes should be able to handle requests.json +1 -0
- package/examples/http/post requests - json content.json +1 -0
- package/examples/{f38603a59963386c/flows.json → http/request parses JSON conent.json } +1 -1
- package/examples/http/request, ensure url and method are handled.json +1 -0
- package/examples/http/set content type.json +1 -0
- package/examples/http/support query string on get request.json +1 -0
- package/examples/inject/repeat interval.json +1 -0
- package/examples/inject/support octal, binary & hex underscore values.json +1 -0
- package/examples/inject/trigger after - does not trigger.json +1 -0
- package/examples/inject/unsupported JSONata function.json +1 -0
- package/examples/join/manual config with count & nested property name.json +1 -0
- package/examples/json/parse example json content.json +1 -0
- package/examples/json/raise exception if content not valid.json +1 -0
- package/examples/json/support prettify json content.json +1 -0
- package/examples/link nodes/across flow tabs.json +1 -0
- package/examples/link nodes/cascading link calls.json +1 -0
- package/examples/markdown/allow for inline html.json +1 -0
- package/examples/markdown/convert markdown to html.json +1 -0
- package/examples/markdown/support code block.json +1 -0
- package/examples/module/Using with Statemachine.json +1 -0
- package/examples/module/Using with function node.json +1 -0
- package/examples/mqtt/auto-(re)connect.json +1 -0
- package/examples/noop/Noop node will error out.json +1 -0
- package/examples/process/Can send messages.json +1 -0
- package/examples/range/basic examples.json +1 -0
- package/examples/split/Array type.json +1 -0
- package/examples/split/binary type.json +1 -0
- package/examples/split/using strings and buffers.json +1 -0
- package/examples/split/work with binary data as string data.json +1 -0
- package/examples/statemachine/Representing gen_statem in Erlang-Red.json +1 -0
- package/examples/statemachine/combined with supervisor.json +1 -0
- package/examples/statemachine/exception if no action to perform.json +1 -0
- package/examples/status/basic working version.json +1 -0
- package/examples/status/only one message per status value.json +1 -0
- package/examples/status/source map inside the status map.json +1 -0
- package/examples/supervisor/inform user if config needs updating.json +1 -0
- package/examples/supervisor/multiple individual supervisors.json +1 -0
- package/examples/supervisor/order defined by Y coordinate..json +1 -0
- package/examples/supervisor/restart after exit call.json +1 -0
- package/examples/supervisor/supervising two function nodes.json +1 -0
- package/examples/supervisor/supervisor loops.json +1 -0
- package/examples/supervisor/supervisor of supervisor of supervisor of .....json +1 -0
- package/examples/supervisor/supervisor told to stop.json +1 -0
- package/examples/supervisor/supervisor tree.json +1 -0
- package/examples/supervisor/two supervisors cannot supervise the same nodes.json +1 -0
- package/examples/supervisor/unsupported configrations.json +1 -0
- package/examples/switch/JSONata undefined value & exceptions.json +1 -0
- package/examples/switch/post debug on JSONata exception.json +1 -0
- package/examples/switch/raise exception if JSONata has exception.json +1 -0
- package/examples/tcp/Bad value on output port (3425).json +1 -0
- package/examples/tcp/multiple tcp in connectors (1194).json +1 -0
- package/examples/tcp/request node - disconnect immediately (1001).json +1 -0
- package/examples/tcp/tcp-out node in reply mode (1202).json +1 -0
- package/examples/tcp/transfer string between nodes (1201).json +1 -0
- package/examples/template/handle base64 encoded data.json +1 -0
- package/examples/template/support mustache template.json +1 -0
- package/examples/trigger/initial example.json +1 -0
- package/nodes/ut-assert-debug.js +66 -17
- package/nodes/ut-assert-values.js +179 -161
- package/package.json +1 -1
- package/plugins/sidebar.html +57 -75
- package/examples/069552b2eb6bce48/flows.json +0 -265
- package/examples/08183069b5f8ef9c/flows.json +0 -156
- package/examples/084fb0fc954b7156/flows.json +0 -132
- package/examples/090eb2d5d71fd45f/flows.json +0 -158
- package/examples/0c35d269ca7178c6/flows.json +0 -443
- package/examples/0cc95e44532c14ec/flows.json +0 -94
- package/examples/16b0bc0cdb0c5807/flows.json +0 -1
- package/examples/16b254125478329a/flows.json +0 -114
- package/examples/182731f54d855071/flows.json +0 -52
- package/examples/1ace9e051618db79/flows.json +0 -125
- package/examples/1c1d2cb981cf9f01/flows.json +0 -120
- package/examples/1db9c9a1b92e0263/flows.json +0 -172
- package/examples/20eeaf41372f7b17/flows.json +0 -62
- package/examples/27804627fb8f56bd/flows.json +0 -178
- package/examples/2a2c508260b96236/flows.json +0 -141
- package/examples/34f859d75b76d03c/flows.json +0 -200
- package/examples/36846ad6698e1bc0/flows.json +0 -163
- package/examples/3be6bc074c7647bd/flows.json +0 -319
- package/examples/44f12f6e4a455084/flows.json +0 -272
- package/examples/45209c67f865ce73/flows.json +0 -1
- package/examples/4657dbc0aa4a97bb/flows.json +0 -268
- package/examples/47514a335b4cd67e/flows.json +0 -362
- package/examples/486c1412721bb241/flows.json +0 -525
- package/examples/51bfa9456b1745c0/flows.json +0 -639
- package/examples/538be5947c639b32/flows.json +0 -75
- package/examples/545871d31c3f5f3f/flows.json +0 -376
- package/examples/55f105cfd894b06c/flows.json +0 -121
- package/examples/57d44c342a1f00e2/flows.json +0 -1
- package/examples/597ee2a683d9908f/flows.json +0 -129
- package/examples/59da63b5adb460db/flows.json +0 -188
- package/examples/61142eb3e4e54eab/flows.json +0 -536
- package/examples/64445798b59d2630/flows.json +0 -257
- package/examples/6d46e3fe1f2245b8/flows.json +0 -86
- package/examples/6dd3a5754f83dc2e/flows.json +0 -232
- package/examples/6ff45e2a0ce77393/flows.json +0 -131
- package/examples/700c94899fdd3334/flows.json +0 -107
- package/examples/7581c2be261f9c17/flows.json +0 -1874
- package/examples/7ecfd18f58fc6510/flows.json +0 -1
- package/examples/7fea9696f6186962/flows.json +0 -141
- package/examples/80655e5d4035fa71/flows.json +0 -215
- package/examples/8421f37b6c40e1ec/flows.json +0 -1
- package/examples/866410b56fa42447/flows.json +0 -1076
- package/examples/89aeaeef64509bed/flows.json +0 -101
- package/examples/8a627c9bfe3b4aff/flows.json +0 -552
- package/examples/96f6f83dcab507e5/flows.json +0 -105
- package/examples/9746601768c3b3b6/flows.json +0 -93
- package/examples/9942fa1aeb1b2428/flows.json +0 -2346
- package/examples/9b1023c95a2613cc/flows.json +0 -141
- package/examples/9d11bfc3a6d88535/flows.json +0 -301
- package/examples/9e7ccc97f80d9afb/flows.json +0 -93
- package/examples/9f0d6c3ad7798a77/flows.json +0 -142
- package/examples/9f7351d7a7304584/flows.json +0 -83
- package/examples/a123cd431f1967cd/flows.json +0 -1757
- package/examples/a4c9cabf4b335488/flows.json +0 -86
- package/examples/a916165378c446e3/flows.json +0 -240
- package/examples/ae38b2dbd23d1681/flows.json +0 -3089
- package/examples/ae8a9b0bbbaff447/flows.json +0 -271
- package/examples/b07b511dc8bb8339/flows.json +0 -92
- package/examples/b1501de32c769cf2/flows.json +0 -94
- package/examples/b5fbcdbffb568569/flows.json +0 -1
- package/examples/b723353a316fa50e/flows.json +0 -1
- package/examples/b864b3e3510cd120/flows.json +0 -205
- package/examples/bdbe94d065f3b3a6/flows.json +0 -143
- package/examples/bfced61e72c69715/flows.json +0 -616
- package/examples/c0b1cf6656eac77f/flows.json +0 -518
- package/examples/c381b5135cc947cd/flows.json +0 -272
- package/examples/c4690c0a085d6ef5/flows.json +0 -145
- package/examples/c5f513bc380bc30a/flows.json +0 -696
- package/examples/cfa8595b2e2b8269/flows.json +0 -255
- package/examples/d17fb2553fe8013a/flows.json +0 -157
- package/examples/d61182e87a604efa/flows.json +0 -340
- package/examples/eb24c92ce5621760/flows.json +0 -141
- package/examples/eb447048178f6e16/flows.json +0 -201
- package/examples/eed68dbcecd1431f/flows.json +0 -204
- package/examples/ef61f644d5436dbe/flows.json +0 -1
- package/examples/f19fdae0c02b4f03/flows.json +0 -1008
- package/examples/f2f61ec9fc46a468/flows.json +0 -575
- package/examples/f346d45c81f595e5/flows.json +0 -501
- package/examples/f5f82ca50317fda7/flows.json +0 -121
- package/examples/f946aafaebb1398d/flows.json +0 -135
- package/examples/f94db507552f4934/flows.json +0 -165
- package/examples/fb50bac16667fc54/flows.json +0 -364
- /package/examples/{684b9066e98b9722/flows.json → .core/Disabled node should not be sent messages.json} +0 -0
- /package/examples/{0e54563ba63b1501/flows.json → .core/assert values ignores failures if requested.json} +0 -0
- /package/examples/{7b77600dcf78933f/flows.json → .core/attribute parsing.json} +0 -0
- /package/examples/{93c6e969dcf84e70/flows.json → .core/ensure that message ids don't change.json} +0 -0
- /package/examples/{d206746f9f2594a6/flows.json → .jsonata/$match operator.json} +0 -0
- /package/examples/{37883612d913fd66/flows.json → .jsonata/$not operator.json} +0 -0
- /package/examples/{caccb020fce3f485/flows.json → .jsonata/$pad function.json} +0 -0
- /package/examples/{a862ae412a70ded1/flows.json → .jsonata/$substring functionality.json} +0 -0
- /package/examples/{0b299a3175fc0df1/flows.json → .jsonata/array indexing both forwards and backwards.json} +0 -0
- /package/examples/{2037454a5ee0d6c3/flows.json → .jsonata/basic support for JSONata.json} +0 -0
- /package/examples/{3e9e526b992d4c48/flows.json → .jsonata/ensure random is seeded.json} +0 -0
- /package/examples/{e7184b7ca4f07907/flows.json → .jsonata/sum arrays of objects.json} +0 -0
- /package/examples/{218350f2e240a15d/flows.json → .jsonata/support $keys function.json} +0 -0
- /package/examples/{b50f775ae3b74d38/flows.json → .jsonata/testing the modulo operator.json} +0 -0
- /package/examples/{1658196c31549916/flows.json → batch/batch until batch is full.json} +0 -0
- /package/examples/{c843dacf753a19d8/flows.json → batch/ensure batch size of 1 works.json} +0 -0
- /package/examples/{9a1bdfdcd7b2be8e/flows.json → batch/performance.json} +0 -0
- /package/examples/{538d2f4704cd2eca/flows.json → catch/ensure source is inside error map.json} +0 -0
- /package/examples/{6a9ffd45c418497b/flows.json → catch/file not found exception.json} +0 -0
- /package/examples/{71f65246c742cfc9/flows.json → catch/multiple nodes in one flow is possible.json} +0 -0
- /package/examples/{ed621e03921c13de/flows.json → catch/uncaught catch - part 2 - work.json} +0 -0
- /package/examples/{f5bdafa844f6d280/flows.json → catch/uncaught catches.json} +0 -0
- /package/examples/{9c51a179141515b2/flows.json → change/change functionality.json} +0 -0
- /package/examples/{ea246f68766c8630/flows.json → change/delete functionality.json} +0 -0
- /package/examples/{30465efe017cc9b0/flows.json → change/delete nested keys.json} +0 -0
- /package/examples/{ced70c769db825eb/flows.json → change/ensure rules are expected in order.json} +0 -0
- /package/examples/{7dae2b1a7881c607/flows.json → change/move functionality.json} +0 -0
- /package/examples/{92054e0dd22f14c6/flows.json → change/raises an exception if JSONata has exception.json} +0 -0
- /package/examples/{b85795a24882502b/flows.json → change/set support nested properties.json} +0 -0
- /package/examples/{c28048d859db3773/flows.json → change/support boolean types.json} +0 -0
- /package/examples/{12572f9ac11e1786/flows.json → change/support json values in the set.json} +0 -0
- /package/examples/{def45a46c8f4da72/flows.json → change/support nested array indicies - setting & getting & deleting.json} +0 -0
- /package/examples/{0cb8971e5f88ed1e/flows.json → change/support nested keys on the set operation.json} +0 -0
- /package/examples/{48d9fdcde317974e/flows.json → change/support timestamp type.json} +0 -0
- /package/examples/{1bac0a78e0a36ec0/flows.json → comment/what is there to test?.json} +0 -0
- /package/examples/{b9cd19107a5145c4/flows.json → complete/disabled nodes don't receive.json} +0 -0
- /package/examples/{5e07acf2da13b504/flows.json → complete/ensure the altered msg object is sent.json} +0 -0
- /package/examples/{01b074cfa6ae8818/flows.json → complete/link nodes.json} +0 -0
- /package/examples/{cd44a688eb2ab3cf/flows.json → complete/messags from unconnected inject.json} +0 -0
- /package/examples/{30c79fc42a5c35eb/flows.json → complete/only handle messages from listened to nodes.json} +0 -0
- /package/examples/{f8727464c799eb22/flows.json → complete/switch node isn't compatible with complete.json} +0 -0
- /package/examples/{b2a67e301fabab0e/flows.json → debug/handle the button press to active and deactive debug output.json} +0 -0
- /package/examples/{a6dc7002d0a8640e/flows.json → debug/if not active, no debug message in panel.json} +0 -0
- /package/examples/{b1463d7bbf545725/flows.json → debug/inactive debug nodes still count messages.json} +0 -0
- /package/examples/{5a06352874fa379d/flows.json → debug/only send debug message to server console if asked to.json} +0 -0
- /package/examples/{c1370220fd37968e/flows.json → delay/ignore msg.delay if its not set.json} +0 -0
- /package/examples/{d17062b01c4a9435/flows.json → delay/random between two values.json} +0 -0
- /package/examples/{3ea113b4ec3b6e5e/flows.json → delay/set delay via msg.delay.json} +0 -0
- /package/examples/{e2a801d2b3e2143f/flows.json → exec/add payload and append arguments.json} +0 -0
- /package/examples/{b98d0b05a760ad79/flows.json → exec/execute simple command.json} +0 -0
- /package/examples/{6ea4c6b373eeaa8d/flows.json → filter/narrowband no topic.json} +0 -0
- /package/examples/{cef9dd7dc179b8b3/flows.json → filter/value differ by topic.json} +0 -0
- /package/examples/{b2fcc5806b2715c0/flows.json → inject/JSONata undefined value & exceptions.json} +0 -0
- /package/examples/{09aab59a2455cf15/flows.json → inject/Payload, topic and fubar set on inject.json} +0 -0
- /package/examples/{8180ae5891c673de/flows.json → inject/ensure that topic is set correctly.json} +0 -0
- /package/examples/{1eb35963b752eca9/flows.json → inject/json support for properties other than payload.json} +0 -0
- /package/examples/{61847d719e50f83f/flows.json → inject/jsonata support for both payload and other properties.json} +0 -0
- /package/examples/{459322e0f8e0b785/flows.json → inject/nested hash & array support.json} +0 -0
- /package/examples/{c163c627bd2a37c7/flows.json → inject/support boolean type.json} +0 -0
- /package/examples/{7e1d04570c6bdff9/flows.json → inject/support jsonata for topic values.json} +0 -0
- /package/examples/{1a196bce3e57f5c1/flows.json → inject/support nested property names.json} +0 -0
- /package/examples/{2a12af161b544aa1/flows.json → inject/support num types.json} +0 -0
- /package/examples/{ec921769b3c24fb6/flows.json → inject/support the msg property type.json} +0 -0
- /package/examples/{9ff2e8ab21d922c5/flows.json → inject/trigger once - default value.json} +0 -0
- /package/examples/{1d3326a724ecbea0/flows.json → join/automatic mode.json} +0 -0
- /package/examples/{24f35eaa8656755f/flows.json → join/count overrides parts, complete overrides count.json} +0 -0
- /package/examples/{987cd33b9cda8529/flows.json → join/manual configration with count and property name.json} +0 -0
- /package/examples/{50d5679818477b66/flows.json → join/manual configuration counting messages.json} +0 -0
- /package/examples/{894f6e38bfd1aca6/flows.json → join/remove parts once matched.json} +0 -0
- /package/examples/{5cf6aec7d688fce4/flows.json → join/results are not ordered by index.json} +0 -0
- /package/examples/{d5424657b497d5af/flows.json → join/useparts with count value.json} +0 -0
- /package/examples/{77854a5ea962257b/flows.json → join/useparts without count value.json} +0 -0
- /package/examples/{f1e71f2ccb34fd6e/flows.json → join/wait for complete until messages are sent.json} +0 -0
- /package/examples/{d4ce58359ff6ff96/flows.json → join/with parts until complete received.json} +0 -0
- /package/examples/{b3f365d0b7d1f97d/flows.json → json/overwrite the attribute.json} +0 -0
- /package/examples/{e1ced3b16782f7c8/flows.json → junction/should just pass on the message.json} +0 -0
- /package/examples/{51870a76d1aaf67a/flows.json → link nodes/_linkSource support.json} +0 -0
- /package/examples/{bbb1fc2d47c3cd5f/flows.json → link nodes/basic test whether out and in can connect.json} +0 -0
- /package/examples/{15c2fad089960984/flows.json → link nodes/dynamic targets and timeout.json} +0 -0
- /package/examples/{c274a07715a87ca4/flows.json → link nodes/exception if dynamic link does not exist.json} +0 -0
- /package/examples/{9463eba0ab843567/flows.json → link nodes/exception if multiple link nodes match.json} +0 -0
- /package/examples/{641ddaab2819c61d/flows.json → link nodes/flow for call and returning.json} +0 -0
- /package/examples/{b6d4e4592b27a344/flows.json → link nodes/implement time out on link call node.json} +0 -0
- /package/examples/{c6ee6e89a51c98fc/flows.json → link nodes/link call - return to sender.json} +0 -0
- /package/examples/{38616d22e1569aa5/flows.json → link nodes/link call to a dynamic link in node - by name.json} +0 -0
- /package/examples/{5433b57035d597f9/flows.json → link nodes/link call to a dynamic link in node - by node id.json} +0 -0
- /package/examples/{213803d61ecfde3a/flows.json → link nodes/mutliple links.json} +0 -0
- /package/examples/{b7ebaf91f4d66ab3/flows.json → sort/array of objects.json} +0 -0
- /package/examples/{cffa610c817beb43/flows.json → sort/msg.complete is not respected.json} +0 -0
- /package/examples/{5f6929bb3374b782/flows.json → sort/sort by parts.index.json} +0 -0
- /package/examples/{b1430ea37ba7cc19/flows.json → split/array split.json} +0 -0
- /package/examples/{4de34883c5d93dc3/flows.json → split/len value is the array split size.json} +0 -0
- /package/examples/{2c59ef974b2523ba/flows.json → split/nested parts.json} +0 -0
- /package/examples/{02b18fc0ed9de178/flows.json → split/parts id is identical.json} +0 -0
- /package/examples/{435d3b48dd0f462c/flows.json → split/silently ignore integer as a value to split.json} +0 -0
- /package/examples/{5cd133958df17529/flows.json → switch/catch all v. stop after first.json} +0 -0
- /package/examples/{562c518969666f24/flows.json → switch/empty, non-empty, null & not-null operators.json} +0 -0
- /package/examples/{3edda6bd788f88c2/flows.json → switch/ensure JSONata support.json} +0 -0
- /package/examples/{2c1c291ec8466bfb/flows.json → switch/handle is true & is false.json} +0 -0
- /package/examples/{59aa8a866d8d7a70/flows.json → switch/handle nested values.json} +0 -0
- /package/examples/{def56742e02f6a75/flows.json → switch/property is not defined on msg object.json} +0 -0
- /package/examples/{f4c4a57e77439a1b/flows.json → switch/regular expression operator.json} +0 -0
- /package/examples/{ce2f98273da05245/flows.json → switch/support otherwise /"catchall/" rule.json"} +0 -0
- /package/examples/{0616f795a4aee63e/flows.json → switch/working JSONata expression operator.json} +0 -0
- /package/examples/{84a5a362cafe703f/flows.json → tcp/request node - stream of strings (1101).json} +0 -0
- /package/examples/{6f0dcbf18234c5e2/flows.json → tcp/tcp in node connect to (9393).json} +0 -0
- /package/examples/{2a95a7b40a798878/flows.json → tcp/telnet server (2323).json} +0 -0
- /package/examples/{698b83b8aeb5d5b6/flows.json → template/contains plain text and no mustache content.json} +0 -0
- /package/examples/{63ca9baf860d1d8f/flows.json → template/support Json encoding.json} +0 -0
- /package/examples/{3ed472eab9503b4f/flows.json → template/support logic in logicless mustache template.json} +0 -0
- /package/examples/{ad2bf1089481dcfb/flows.json → trigger/extend timer.json} +0 -0
- /package/examples/{8bc7412d6a4869c6/flows.json → trigger/loops of triggers.json} +0 -0
- /package/examples/{55f7fbe90e5befa8/flows.json → trigger/msg.delay overrides the configured delay.json} +0 -0
- /package/examples/{34d211e37618313c/flows.json → trigger/override via delay but no delay set.json} +0 -0
- /package/examples/{988f27b9abdde6e9/flows.json → trigger/send both messages on one pipe.json} +0 -0
- /package/examples/{338c5b411f4edfe8/flows.json → trigger/send first but not second message.json} +0 -0
- /package/examples/{5d4908af3d4f95e5/flows.json → trigger/send second message only.json} +0 -0
- /package/examples/{d595c53abba88f72/flows.json → trigger/the noop trigger.json} +0 -0
- /package/examples/{1566e453a88578a9/flows.json → trigger/two outputs.json} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"id":"3afa3b2ec00a5e3d","type":"tab","label":"[supervisor] multiple individual supervisors","disabled":false,"info":"<small><i>[Share link](https://flows.red-erik.org/f/3afa3b2ec00a5e3d)</i></small>\n\nDemonstrate the various configurations of the supervisor node visually.\n\nFor more details on the configuration of Supervisors, check the [OTP documentation](https://www.erlang.org/doc/apps/stdlib/supervisor.html).\n\n## Setup\n\nFirst comes the source of messages. <a class='ahl-group-only' data-ids='f75f3dfd9421f0f1'>Message generator</a> that generates a continous stream of messages until 20k messages have been generated.\n\nThese messages are feed into nodes that are supervised by a supervisor. A <a class='ahl-node-only' data-ids='ca381bfca1c3a6a8'>link out node</a> and several <a class='ahl-node-only' data-ids='6dffa4232a7ec9a9,7835bb0a66ce9604,07a48d0ae3691dfd,f032986923013ead'>link in nodes</a> do this.\n\nSupervisor <a class='ahl-group-only' data-ids='f819a208c9a9e301'>restart flow</a> takes care of restarting supervisors if they die. This happens when their intensity/period limits are hit. For these tests, that is always 150/30, i.e. 150 failures within a 30 second period causes the supervisor to die and with it, the nodes it was supervising. Supervisor nodes supervising other supervisor nodes is not yet implemented but ErlangRED provides an alternative solution as implemeted here.\n\n\n## TL;DR\n\nThis is an image of a previous iteration of the supervisor node as discussed in the [Erlang forum](https://erlangforums.com/t/erlangred-supervisor-node-any-other-configuration-that-might-be-necessary-for-a-supervisor/4776/2?u=gorenje).\n\n\n\nWhat is shown is a supervisor that is supervising three function nodes and two debug nodes. The debug nodes are just counting messages as they come in. The bottom and top function nodes just pass through the messages they receive and the middle function node does an `exit(self(), failure)` - its the process/node that is failing.\n\nThe supervisor has an intensity of 500 over 30 seconds. Not shown is a message generator that is an infinite loop that pauses for 5 millisecond between messages. The debug node at the very bottom is counting those messages.\n\nThe order in which the child processes are started is defined in the supervisor node. The order is as shown in the image, from top to bottom: `function 1`, `debug 1`, `exit call`, `function 3` and `debug 6`. This will become important with the rest-for-one restart strategy. \n\nSo what happens? When the first message comes in (all function nodes receive the same messages), the exit call function fails and the supervisor restarts it.\n\nFor one-for-all, all nodes are restarted. The debug nodes have their counts reset to zero and hence they are showing 1. It’s always a new message but they never get beyond one message because the exit-call function keeps being restarted by the supervisor and so are the debug nodes (the green nodes).\n\nThe one-for-one strategy shows the debug nodes hitting a message count of 501 because after 500 messages, the supervisor dies. What is not shown is that the supervisor is automagically restarted after two seconds (shown by the status of the supervisor node). When the supervisor is restarted, the processes that represent the function and debug nodes are restarted and begin receiving message from existing nodes/processes again.\n\nFinally the rest-for-one strategy shows that the top debug continues to receive messages (i.e. isn’t restarted) when the exit function is restarted but the debug 6 counter stays at 1 - because it’s being restarted and only receives one message before being restarted.\n\n## Supervisors\n\nFour supervisors are defined that each supervise two debug nodes and one function node. The function node exits with a call to exit. Each supervisor implements a different restart strategy.\n\n- <a class='ahl-group-only' data-ids='2936cc7950d10f77'>rest-for-one</a> ordering being top to bottom meaning that the <a class='ahl-node-only' data-ids='40091b993841f325'>exit call function node</a>, when restarted, will also cause the nodes below it to be restarted.\n\n- <a class='ahl-group-only' data-ids='859955c795ba6c86'>rest-for-one</a> ordering being bottom to top meaning that the <a class='ahl-node-only' data-ids='0bd18da85d825d6f'>exit call function node</a>, when restarted, will also cause the nodes above it to be restarted.\n\n- <a class='ahl-group-only' data-ids='34c704ff5c1978cf'>one-for-one</a> here when the <a class='ahl-node-only' data-ids='4c545d0296232dbb'>function node</a> is restarted by the <a class='ahl-node-only' data-ids='61de32d2e9fdd19f'>supervisor node</a>, the two <a class='ahl-node-only' data-ids='e51d981260fcda5f,38c20f8cb95a4965'>debug nodes</a> are affected and only stopped once the supervisor dies. Hence both debung nodes hit a count of 150.\n\n- <a class='ahl-group-only' data-ids='fa67af97329dd415'>one-for-all</a> means that all nodes under supervision are restarted if any node fails and is restarted. This means that the <a class='ahl-node-only' data-ids='9d89f7d1f2181a14,8123a9952db0b131'>debug nodes</a> are constantly being restarted by the <a class='ahl-node-only' data-ids='57e6cd2a05214926'>supervisor node</a> since the <a class='ahl-node-only' data-ids='3fe75266b20c7d3f'>function node</a> is constantly dying. The debug nodes show a count of 1 but that is always a new message - this can be experienced by getting the debug nodes to send their messages to the debug panel.\n\n[Next: Single Supervisor with restart flow](https://flows.red-erik.org/f/6b22ce2a482c2d6d).","env":[{"name":"ERED_NOT_EUNIT","value":"true","type":"bool"},{"name":"ERED_ONLY","value":"true","type":"bool"}]},{"id":"2936cc7950d10f77","type":"group","z":"3afa3b2ec00a5e3d","name":"rest - for - one - order top to bottom","style":{"label":true},"nodes":["4ae02f63f450c6f9","40091b993841f325","54a9791650cb61b7","23d96d3b8391cef5","d52aac5750f2bb0c","f0ee2b3e4781eb6f","43aa4576cc0449fd","f38f641b0fe0202f","7cdde8314f6355d7","f032986923013ead"],"x":487,"y":856.010320186615,"w":334.92850494384766,"h":780.0610542297363},{"id":"859955c795ba6c86","type":"group","z":"3afa3b2ec00a5e3d","name":"rest - for - one - order bottom to top","style":{"label":true},"nodes":["d429c9c28047ef4c","0bd18da85d825d6f","b50a8242b41ae0c6","92ec6d9f3d879580","ee2f23c2b6fee4f8","2080a6ce08b2c7de","cd3028c339baf502","46f646d7334123c2","74c3ab0399dc06e2","07a48d0ae3691dfd"],"x":882,"y":856.1666030883789,"w":339.92850494384766,"h":779.9047713279724},{"id":"34c704ff5c1978cf","type":"group","z":"3afa3b2ec00a5e3d","name":"one - for - one","style":{"label":true},"nodes":["61de32d2e9fdd19f","4c545d0296232dbb","e51d981260fcda5f","38c20f8cb95a4965","aa1dbbcfff2809b7","55a6ebecbdbb73e7","c255165743dab74e","29471e95423b991b","0d8e15cfb25a1343","7835bb0a66ce9604"],"x":1326,"y":856.1666030883789,"w":335.92850494384766,"h":779.9047713279724},{"id":"fa67af97329dd415","type":"group","z":"3afa3b2ec00a5e3d","name":"one - for - all","style":{"label":true},"nodes":["57e6cd2a05214926","3fe75266b20c7d3f","9d89f7d1f2181a14","8123a9952db0b131","0ab6b6e6cbe62b6a","e73de5dd8451e30b","dcfd4fec22f930eb","3dd04914baf158a5","1e697584bfe7e0b7","6dffa4232a7ec9a9"],"x":1732.4285888671875,"y":857.1666030883789,"w":340.92850494384766,"h":778.9047713279724},{"id":"f75f3dfd9421f0f1","type":"group","z":"3afa3b2ec00a5e3d","name":"Message generator","style":{"label":true},"nodes":["5ee386c316c97c98","d4f0e1e9a072564c","c21afac904cde5e5","6c8fa72eb01d983a","ca381bfca1c3a6a8","397ff5c6eab3be66"],"x":100,"y":64.41222381591797,"w":766.3333740234375,"h":299.08252716064453},{"id":"f819a208c9a9e301","type":"group","z":"3afa3b2ec00a5e3d","name":"supervisor restarter","style":{"label":true},"nodes":["e7ea5b5137caea30","b876a72386d90b15","c9794e21debc9042","1a14a3c9d29e9969","42d44efed110f119"],"x":1329,"y":124.41150665283203,"w":804.833251953125,"h":97},{"id":"43aa4576cc0449fd","type":"junction","z":"3afa3b2ec00a5e3d","g":"2936cc7950d10f77","x":587.2502408027649,"y":1498.25,"wires":[["23d96d3b8391cef5","40091b993841f325","54a9791650cb61b7"]]},{"id":"74c3ab0399dc06e2","type":"junction","z":"3afa3b2ec00a5e3d","g":"859955c795ba6c86","x":985.9489097595215,"y":1498.625,"wires":[["92ec6d9f3d879580","0bd18da85d825d6f","b50a8242b41ae0c6"]]},{"id":"0d8e15cfb25a1343","type":"junction","z":"3afa3b2ec00a5e3d","g":"34c704ff5c1978cf","x":1425.9489097595215,"y":1497.625,"wires":[["38c20f8cb95a4965","4c545d0296232dbb","e51d981260fcda5f"]]},{"id":"1e697584bfe7e0b7","type":"junction","z":"3afa3b2ec00a5e3d","g":"fa67af97329dd415","x":1837.377498626709,"y":1498.625,"wires":[["8123a9952db0b131","3fe75266b20c7d3f","9d89f7d1f2181a14"]]},{"id":"5ee386c316c97c98","type":"inject","z":"3afa3b2ec00a5e3d","g":"f75f3dfd9421f0f1","name":"Start Button","props":[{"p":"payload"},{"p":"msgcnt","v":"0","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":274.0000305175781,"y":105.41222381591797,"wires":[["d4f0e1e9a072564c"]]},{"id":"d4f0e1e9a072564c","type":"change","z":"3afa3b2ec00a5e3d","g":"f75f3dfd9421f0f1","name":"","rules":[{"p":"payload","pt":"msg","t":"set","to":"","tot":"date"},{"p":"msgcnt","pt":"msg","t":"set","to":"$$.msgcnt + 1","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":524.3333740234375,"y":211.1197509765625,"wires":[["c21afac904cde5e5","6c8fa72eb01d983a","ca381bfca1c3a6a8"]]},{"id":"c21afac904cde5e5","type":"delay","z":"3afa3b2ec00a5e3d","g":"f75f3dfd9421f0f1","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":770.3333740234375,"y":322.4947509765625,"wires":[["397ff5c6eab3be66"]]},{"id":"6c8fa72eb01d983a","type":"debug","z":"3afa3b2ec00a5e3d","g":"f75f3dfd9421f0f1","name":"debug 2","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":760.3333740234375,"y":105.41222381591797,"wires":[]},{"id":"e7ea5b5137caea30","type":"switch","z":"3afa3b2ec00a5e3d","g":"f819a208c9a9e301","name":"what status?","property":"status","propertyType":"msg","rules":[{"t":"eq","v":"dead","vt":"str"},{"t":"eq","v":"started","vt":"str"},{"t":"eq","v":"restarted","vt":"str"}],"checkall":"false","repair":false,"outputs":3,"x":1522.166748046875,"y":172.91150665283203,"wires":[["b876a72386d90b15"],[],[]]},{"id":"b876a72386d90b15","type":"delay","z":"3afa3b2ec00a5e3d","g":"f819a208c9a9e301","name":"","pauseType":"random","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"7","randomUnits":"milliseconds","drop":false,"allowrate":false,"outputs":1,"x":1726.0953922271729,"y":172.91150665283203,"wires":[["c9794e21debc9042"]]},{"id":"c9794e21debc9042","type":"change","z":"3afa3b2ec00a5e3d","g":"f819a208c9a9e301","name":"","rules":[{"p":"action","pt":"msg","t":"set","to":"restart","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1917.547607421875,"y":172.91150665283203,"wires":[["42d44efed110f119"]]},{"id":"4ae02f63f450c6f9","type":"erlsupervisor","z":"3afa3b2ec00a5e3d","g":"2936cc7950d10f77","name":"rest for one","scope":["23d96d3b8391cef5","40091b993841f325","54a9791650cb61b7"],"supervisor_type":"static","strategy":"rest_for_one","auto_shutdown":"never","intensity":"150","period":"30","child_type":"worker","child_restart":"permanent","child_shutdown":"brutal_kill","child_shutdown_timeout":"","x":668.0000038146973,"y":1015.5,"wires":[["d52aac5750f2bb0c"]]},{"id":"40091b993841f325","type":"function","z":"3afa3b2ec00a5e3d","g":"2936cc7950d10f77","name":"exit call","func":"exit(self(), failure)","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":718.5,"y":1498.25,"wires":[[]]},{"id":"54a9791650cb61b7","type":"debug","z":"3afa3b2ec00a5e3d","g":"2936cc7950d10f77","name":"debug 1","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":713.5000839233398,"y":1595.0713744163513,"wires":[]},{"id":"23d96d3b8391cef5","type":"debug","z":"3afa3b2ec00a5e3d","g":"2936cc7950d10f77","name":"debug 3","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":715.9285049438477,"y":1407.0104055404663,"wires":[]},{"id":"d52aac5750f2bb0c","type":"change","z":"3afa3b2ec00a5e3d","g":"2936cc7950d10f77","name":"","rules":[{"p":"supervisor","pt":"msg","t":"set","to":"one","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":668.0000038146973,"y":1085.343686580658,"wires":[["7cdde8314f6355d7"]]},{"id":"f0ee2b3e4781eb6f","type":"switch","z":"3afa3b2ec00a5e3d","g":"2936cc7950d10f77","name":"","property":"supervisor","propertyType":"msg","rules":[{"t":"eq","v":"one","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":668.0000038146973,"y":955.3436636924744,"wires":[["4ae02f63f450c6f9"]]},{"id":"d429c9c28047ef4c","type":"erlsupervisor","z":"3afa3b2ec00a5e3d","g":"859955c795ba6c86","name":"rest for one","scope":["b50a8242b41ae0c6","0bd18da85d825d6f","92ec6d9f3d879580"],"supervisor_type":"static","strategy":"rest_for_one","auto_shutdown":"never","intensity":"150","period":"30","child_type":"worker","child_restart":"permanent","child_shutdown":"brutal_kill","child_shutdown_timeout":"","x":1068.0000038146973,"y":1015.5,"wires":[["ee2f23c2b6fee4f8"]]},{"id":"0bd18da85d825d6f","type":"function","z":"3afa3b2ec00a5e3d","g":"859955c795ba6c86","name":"exit call","func":"exit(self(), failure)","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1118.5,"y":1498.625,"wires":[[]]},{"id":"b50a8242b41ae0c6","type":"debug","z":"3afa3b2ec00a5e3d","g":"859955c795ba6c86","name":"debug 4","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":1113.5000839233398,"y":1595.0713744163513,"wires":[]},{"id":"92ec6d9f3d879580","type":"debug","z":"3afa3b2ec00a5e3d","g":"859955c795ba6c86","name":"debug 5","active":false,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":1115.9285049438477,"y":1407.0104055404663,"wires":[]},{"id":"ee2f23c2b6fee4f8","type":"change","z":"3afa3b2ec00a5e3d","g":"859955c795ba6c86","name":"","rules":[{"p":"supervisor","pt":"msg","t":"set","to":"two","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1068.0000038146973,"y":1085.343686580658,"wires":[["46f646d7334123c2"]]},{"id":"2080a6ce08b2c7de","type":"switch","z":"3afa3b2ec00a5e3d","g":"859955c795ba6c86","name":"","property":"supervisor","propertyType":"msg","rules":[{"t":"eq","v":"two","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1068.0000038146973,"y":955.3436636924744,"wires":[["d429c9c28047ef4c"]]},{"id":"f38f641b0fe0202f","type":"link in","z":"3afa3b2ec00a5e3d","g":"2936cc7950d10f77","name":"sup one","links":["42d44efed110f119"],"x":668.0000038146973,"y":897.010320186615,"wires":[["f0ee2b3e4781eb6f"]]},{"id":"7cdde8314f6355d7","type":"link out","z":"3afa3b2ec00a5e3d","g":"2936cc7950d10f77","name":"link out 1","mode":"link","links":["1a14a3c9d29e9969"],"x":668.0000038146973,"y":1150.3436821301777,"wires":[]},{"id":"cd3028c339baf502","type":"link in","z":"3afa3b2ec00a5e3d","g":"859955c795ba6c86","name":"sup two","links":["42d44efed110f119"],"x":1068.0000038146973,"y":897.1666030883789,"wires":[["2080a6ce08b2c7de"]]},{"id":"46f646d7334123c2","type":"link out","z":"3afa3b2ec00a5e3d","g":"859955c795ba6c86","name":"link out 3","mode":"link","links":["1a14a3c9d29e9969"],"x":1068.0000038146973,"y":1148.8333129882812,"wires":[]},{"id":"1a14a3c9d29e9969","type":"link in","z":"3afa3b2ec00a5e3d","g":"f819a208c9a9e301","name":"undertaker","links":["46f646d7334123c2","7cdde8314f6355d7","29471e95423b991b","3dd04914baf158a5"],"x":1370,"y":172.91150665283203,"wires":[["e7ea5b5137caea30"]]},{"id":"61de32d2e9fdd19f","type":"erlsupervisor","z":"3afa3b2ec00a5e3d","g":"34c704ff5c1978cf","name":"one for one","scope":["e51d981260fcda5f","4c545d0296232dbb","38c20f8cb95a4965"],"supervisor_type":"static","strategy":"one_for_one","auto_shutdown":"never","intensity":"150","period":"30","child_type":"worker","child_restart":"permanent","child_shutdown":"brutal_kill","child_shutdown_timeout":"","x":1508.0000038146973,"y":1015.5,"wires":[["aa1dbbcfff2809b7"]]},{"id":"4c545d0296232dbb","type":"function","z":"3afa3b2ec00a5e3d","g":"34c704ff5c1978cf","name":"exit call","func":"exit(self(), failure)","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1558.5,"y":1497.625,"wires":[[]]},{"id":"e51d981260fcda5f","type":"debug","z":"3afa3b2ec00a5e3d","g":"34c704ff5c1978cf","name":"debug 6","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":1553.5000839233398,"y":1595.0713744163513,"wires":[]},{"id":"38c20f8cb95a4965","type":"debug","z":"3afa3b2ec00a5e3d","g":"34c704ff5c1978cf","name":"debug 7","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":1555.9285049438477,"y":1407.0104055404663,"wires":[]},{"id":"aa1dbbcfff2809b7","type":"change","z":"3afa3b2ec00a5e3d","g":"34c704ff5c1978cf","name":"","rules":[{"p":"supervisor","pt":"msg","t":"set","to":"three","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1508.0000038146973,"y":1085.343686580658,"wires":[["29471e95423b991b"]]},{"id":"55a6ebecbdbb73e7","type":"switch","z":"3afa3b2ec00a5e3d","g":"34c704ff5c1978cf","name":"","property":"supervisor","propertyType":"msg","rules":[{"t":"eq","v":"three","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1508.0000038146973,"y":955.3436636924744,"wires":[["61de32d2e9fdd19f"]]},{"id":"c255165743dab74e","type":"link in","z":"3afa3b2ec00a5e3d","g":"34c704ff5c1978cf","name":"sup three","links":["42d44efed110f119"],"x":1508.0000038146973,"y":897.1666030883789,"wires":[["55a6ebecbdbb73e7"]]},{"id":"29471e95423b991b","type":"link out","z":"3afa3b2ec00a5e3d","g":"34c704ff5c1978cf","name":"link out 4","mode":"link","links":["1a14a3c9d29e9969"],"x":1508.0000038146973,"y":1148.8333129882812,"wires":[]},{"id":"57e6cd2a05214926","type":"erlsupervisor","z":"3afa3b2ec00a5e3d","g":"fa67af97329dd415","name":"one for all","scope":["9d89f7d1f2181a14","3fe75266b20c7d3f","8123a9952db0b131"],"supervisor_type":"static","strategy":"one_for_all","auto_shutdown":"never","intensity":"150","period":"30","child_type":"worker","child_restart":"permanent","child_shutdown":"brutal_kill","child_shutdown_timeout":"","x":1911.4285926818848,"y":1016.5,"wires":[["0ab6b6e6cbe62b6a"]]},{"id":"3fe75266b20c7d3f","type":"function","z":"3afa3b2ec00a5e3d","g":"fa67af97329dd415","name":"exit call","func":"exit(self(), failure)","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1969.9285888671875,"y":1498.625,"wires":[[]]},{"id":"9d89f7d1f2181a14","type":"debug","z":"3afa3b2ec00a5e3d","g":"fa67af97329dd415","name":"debug 8","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":1964.9286727905273,"y":1595.0713744163513,"wires":[]},{"id":"8123a9952db0b131","type":"debug","z":"3afa3b2ec00a5e3d","g":"fa67af97329dd415","name":"debug 9","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":1967.3570938110352,"y":1407.0104055404663,"wires":[]},{"id":"0ab6b6e6cbe62b6a","type":"change","z":"3afa3b2ec00a5e3d","g":"fa67af97329dd415","name":"","rules":[{"p":"supervisor","pt":"msg","t":"set","to":"four","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1911.4285926818848,"y":1086.343686580658,"wires":[["3dd04914baf158a5"]]},{"id":"e73de5dd8451e30b","type":"switch","z":"3afa3b2ec00a5e3d","g":"fa67af97329dd415","name":"","property":"supervisor","propertyType":"msg","rules":[{"t":"eq","v":"four","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1911.4285926818848,"y":956.3436636924744,"wires":[["57e6cd2a05214926"]]},{"id":"dcfd4fec22f930eb","type":"link in","z":"3afa3b2ec00a5e3d","g":"fa67af97329dd415","name":"sup four","links":["42d44efed110f119"],"x":1911.4285926818848,"y":898.1666030883789,"wires":[["e73de5dd8451e30b"]]},{"id":"3dd04914baf158a5","type":"link out","z":"3afa3b2ec00a5e3d","g":"fa67af97329dd415","name":"link out 5","mode":"link","links":["1a14a3c9d29e9969"],"x":1911.4285926818848,"y":1149.8333129882812,"wires":[]},{"id":"ca381bfca1c3a6a8","type":"link out","z":"3afa3b2ec00a5e3d","g":"f75f3dfd9421f0f1","name":"msg generator","mode":"link","links":["f032986923013ead","07a48d0ae3691dfd","7835bb0a66ce9604","6dffa4232a7ec9a9"],"x":715.3333740234375,"y":211.1197509765625,"wires":[]},{"id":"42d44efed110f119","type":"link out","z":"3afa3b2ec00a5e3d","g":"f819a208c9a9e301","name":"link out 2","mode":"link","links":["f38f641b0fe0202f","cd3028c339baf502","c255165743dab74e","dcfd4fec22f930eb"],"x":2092.833251953125,"y":172.91150665283203,"wires":[]},{"id":"f032986923013ead","type":"link in","z":"3afa3b2ec00a5e3d","g":"2936cc7950d10f77","name":"link in 1","links":["ca381bfca1c3a6a8"],"x":528,"y":1498.25,"wires":[["43aa4576cc0449fd"]]},{"id":"07a48d0ae3691dfd","type":"link in","z":"3afa3b2ec00a5e3d","g":"859955c795ba6c86","name":"link in 2","links":["ca381bfca1c3a6a8"],"x":923,"y":1498.625,"wires":[["74c3ab0399dc06e2"]]},{"id":"7835bb0a66ce9604","type":"link in","z":"3afa3b2ec00a5e3d","g":"34c704ff5c1978cf","name":"link in 3","links":["ca381bfca1c3a6a8"],"x":1367,"y":1497.625,"wires":[["0d8e15cfb25a1343"]]},{"id":"6dffa4232a7ec9a9","type":"link in","z":"3afa3b2ec00a5e3d","g":"fa67af97329dd415","name":"link in 4","links":["ca381bfca1c3a6a8"],"x":1773.4285888671875,"y":1498.625,"wires":[["1e697584bfe7e0b7"]]},{"id":"397ff5c6eab3be66","type":"switch","z":"3afa3b2ec00a5e3d","g":"f75f3dfd9421f0f1","name":"stop after 20k messages","property":"msgcnt","propertyType":"msg","rules":[{"t":"lt","v":"20000","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":236,"y":322.4947509765625,"wires":[["d4f0e1e9a072564c"]]}]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"id":"79d0839cd7b4061d","type":"tab","label":"[supervisor] order defined by Y coordinate.","disabled":false,"info":"**NOTE**: this is used for educational purposes and will **never** be a final solution.\n\nLocational information of nodes will **never** and **should** never be a defining factor for the logic of a program or code. Visually things are connected and that defines the logical workings of a program but the position of nodes should not.\n\n*Kids: don't do this at home!*\n\n**DEPRECATED** this no longer works since the ordering of processs is now done in the supervisor itself. The 'y' coordinate does nothing, nichts, nada, nothing.\n\nI fixed this test by setting the correct order in the <a class=\"ahl-node-only\" data-ids=\"8eb034363420b0ba\">supervisor: 5</a> node.","env":[{"name":"ERED_PENDING","value":"false","type":"bool"},{"name":"ERED_NOT_EUNIT","value":"true","type":"bool"},{"name":"ERED_ONLY","value":"true","type":"bool"}]},{"id":"458abbe562d49be9","type":"group","z":"79d0839cd7b4061d","style":{"color":"#a4a4a4","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","stroke":"#999999","stroke-opacity":"1"},"nodes":["8eb034363420b0ba","8efa1f4a5aed9db5","94f66b9d12388956","64b181cb53e6c86c","de5463924bdaac22","d907c0a4fb165a0c"],"x":778,"y":437.2039489746094,"w":369,"h":350.5000305175781},{"id":"bd184591e87e719f","type":"junction","z":"79d0839cd7b4061d","x":244.74490213394165,"y":215.71429443359375,"wires":[["20e44d61b31a7aa8"]]},{"id":"3a32b74ce99e743f","type":"junction","z":"79d0839cd7b4061d","x":1548.7756123542786,"y":215.71429443359375,"wires":[["bd184591e87e719f"]]},{"id":"87a7905c41201abc","type":"inject","z":"79d0839cd7b4061d","name":"start button","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":988.857177734375,"y":834.9539184570312,"wires":[["a23d0b2316e2d68f"]]},{"id":"a23d0b2316e2d68f","type":"change","z":"79d0839cd7b4061d","name":"","rules":[{"p":"payload","pt":"msg","t":"set","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":395.857177734375,"y":973.9539184570312,"wires":[["8efa1f4a5aed9db5","c94a99bf9547c8e7","4e0bd2d67ea4b10c","f42cbc166e0293ad","64b181cb53e6c86c","94f66b9d12388956"]]},{"id":"de5463924bdaac22","type":"debug","z":"79d0839cd7b4061d","g":"458abbe562d49be9","name":"debug 6","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":1041,"y":746.7039794921875,"wires":[]},{"id":"c94a99bf9547c8e7","type":"delay","z":"79d0839cd7b4061d","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":394.8571548461914,"y":1069.2039456367493,"wires":[["a23d0b2316e2d68f"]]},{"id":"4e0bd2d67ea4b10c","type":"debug","z":"79d0839cd7b4061d","name":"debug 7","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":991.5714111328125,"y":912.9182739257812,"wires":[]},{"id":"df5930c0614e6a57","type":"switch","z":"79d0839cd7b4061d","name":"what status?","property":"status","propertyType":"msg","rules":[{"t":"eq","v":"dead","vt":"str"},{"t":"eq","v":"started","vt":"str"},{"t":"eq","v":"restarted","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":1252.8571548461914,"y":478.20394563674927,"wires":[["87a1196be7bf4a8f","0fec0a4e2c7d03ce","301681f6cd05ca75"],["36a46b7d1034ec7b"],["c373106927a864c1"]]},{"id":"c373106927a864c1","type":"debug","z":"79d0839cd7b4061d","name":"restarted counter","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":1578.8571548461914,"y":533.2039456367493,"wires":[]},{"id":"36a46b7d1034ec7b","type":"debug","z":"79d0839cd7b4061d","name":"started counter","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":1568.8571548461914,"y":478.20394563674927,"wires":[]},{"id":"87a1196be7bf4a8f","type":"debug","z":"79d0839cd7b4061d","name":"dead counter","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":1559.8571548461914,"y":419.20394563674927,"wires":[]},{"id":"0fec0a4e2c7d03ce","type":"delay","z":"79d0839cd7b4061d","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1467.285743713379,"y":296.06109285354614,"wires":[["3a32b74ce99e743f"]]},{"id":"20e44d61b31a7aa8","type":"change","z":"79d0839cd7b4061d","name":"","rules":[{"p":"action","pt":"msg","t":"set","to":"restart","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":398.57140350341797,"y":478.20394563674927,"wires":[["8eb034363420b0ba"]]},{"id":"f42cbc166e0293ad","type":"join","z":"79d0839cd7b4061d","name":"atleast","mode":"custom","build":"array","property":"","propertyType":"full","key":"topic","joiner":"\\n","joinerType":"str","useparts":false,"accumulate":false,"timeout":"","count":"250","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":305.5714111328125,"y":724.632568359375,"wires":[["ab4241fce137fdb0"]]},{"id":"ab4241fce137fdb0","type":"ut-assert-success","z":"79d0839cd7b4061d","name":"","count":"0","x":298.5714111328125,"y":620.6325073242188,"wires":[]},{"id":"301681f6cd05ca75","type":"ut-assert-success","z":"79d0839cd7b4061d","name":"","count":1,"x":1558.8571548461914,"y":362.70394563674927,"wires":[]},{"id":"8eb034363420b0ba","type":"erlsupervisor","z":"79d0839cd7b4061d","g":"458abbe562d49be9","name":"","scope":["64b181cb53e6c86c","d907c0a4fb165a0c","8efa1f4a5aed9db5","94f66b9d12388956","de5463924bdaac22"],"supervisor_type":"static","strategy":"rest_for_one","auto_shutdown":"never","intensity":"5","period":"30","child_type":"worker","child_restart":"permanent","child_shutdown":"brutal_kill","child_shutdown_timeout":"","x":950.857177734375,"y":478.2039489746094,"wires":[["df5930c0614e6a57"]]},{"id":"8efa1f4a5aed9db5","type":"function","z":"79d0839cd7b4061d","g":"458abbe562d49be9","name":"exit call","func":"exit(self(),failure)","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":864,"y":653.1019897460938,"wires":[[]]},{"id":"94f66b9d12388956","type":"function","z":"79d0839cd7b4061d","g":"458abbe562d49be9","name":"function 3","func":"maps:put(hello,world,Msg)\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":864,"y":746.7039794921875,"wires":[["de5463924bdaac22"]]},{"id":"d907c0a4fb165a0c","type":"debug","z":"79d0839cd7b4061d","g":"458abbe562d49be9","name":"debug 1","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":1041,"y":559.5,"wires":[]},{"id":"64b181cb53e6c86c","type":"function","z":"79d0839cd7b4061d","g":"458abbe562d49be9","name":"function 1","func":"maps:put(hello,world,Msg)\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":864,"y":559.5,"wires":[["d907c0a4fb165a0c"]]}]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"id":"6b22ce2a482c2d6d","type":"tab","label":"[supervisor] restart after exit call","disabled":false,"info":"<small><i>[Share Link](https://flows.red-erik.org/f/6b22ce2a482c2d6d)</i></small>\n\n## Restart supervisor via message\n\nHere the <a class=\"ahl-node-only\" data-ids=\"021e749ad389ab88\">supervisor</a> is supervising two function nodes, <a class=\"ahl-node-only\" data-ids=\"874cb18b3842747d\">one</a> of which exits each time it receives a message. The <a class=\"ahl-node-only\" data-ids=\"84927e2b99bfc27b\">second</a> function node passes the message through, unaltered.\n\nA <a class=\"ahl-group-only\" data-ids=\"eb4c717d536bec97\">message generator</a> sends both function nodes a continous stream of messages. Messages are five milliseconds apart, two hundred messages per second.\n\nThe configuration of the <a class=\"ahl-node-only\" data-ids=\"021e749ad389ab88\">supervisor</a> is intensity of 5 over a period of 30 seconds. Meaning the functions node can fail up to five times in a thirty second period.\n\nThe <a class=\"ahl-node-only\" data-ids=\"874cb18b3842747d\">exit call</a> function fails *each* time it receives a message, meaning it fails 5 times in 25 *milli*seconds, after 30 milliseconds the <a class=\"ahl-node-only\" data-ids=\"021e749ad389ab88\">supervisor</a> also fails, taking with it the second <a class=\"ahl-node-only\" data-ids=\"84927e2b99bfc27b\">function</a> node.\n\n\nThat is way the <a class=\"ahl-node-only\" data-ids=\"1ea63df69490f4db\">debug message counter</a> is incremented in blocks of six, because the <a class=\"ahl-node-only\" data-ids=\"84927e2b99bfc27b\">function 2</a> passes through the first six messages, then dies, gets restarted and passes through another six messages.\n\n\n\n\nWhen the <a class=\"ahl-node-only\" data-ids=\"021e749ad389ab88\">supervisor</a> fails, it sends a message to the <a class=\"ahl-node-only\" data-ids=\"29503cddc16de778\">what status?</a> switch node that, if the status of the supervisor is `dead` then directs the message along the <a class=\"ahl-group-only\" data-ids=\"e1a45cd7394adb90\">restart path</a>.\n\nThe message is <a class=\"ahl-node-only\" data-ids=\"efac69a788e070b5\">delayed by 2s</a> and the <a class=\"ahl-node-only\" data-ids=\"8277b19f347ddcfb\">set msg.action</a> to `restart` before being passed to the supervisor. It then restarts just to fail again after 30 milliseconds.\n\n## Supervisor to supervise a Supervisor\n\nIt is also possible to use a supervisor node to restart a supervisor, that is demonstrated by this [flow](https://flows.red-erik.org/f/e447b0048a5983b5).\n\n","env":[{"name":"ERED_TIMEOUT","value":"9","type":"num"},{"name":"ERED_NOT_EUNIT","value":"true","type":"bool"},{"name":"ERED_ONLY","value":"true","type":"bool"}]},{"id":"abf8c9a905272f8e","type":"group","z":"6b22ce2a482c2d6d","style":{"color":"#a4a4a4","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","stroke":"#999999","stroke-opacity":"1"},"nodes":["021e749ad389ab88","874cb18b3842747d","84927e2b99bfc27b"],"x":925,"y":404,"w":272,"h":528.5714285714286},{"id":"eb4c717d536bec97","type":"group","z":"6b22ce2a482c2d6d","name":"message generator","style":{"label":true},"nodes":["00404d33057120fb","b1e8a05edf9a1f49","fa84ecd4d8a1c08d"],"x":164,"y":746.75,"w":531,"h":190.25},{"id":"e1a45cd7394adb90","type":"group","z":"6b22ce2a482c2d6d","name":"restart path","style":{"label":true},"nodes":["efac69a788e070b5","8277b19f347ddcfb","b14c6de25717ff89","35f156dc1adffb2e"],"x":737.2055430412292,"y":191.22167646884918,"w":823.7129144668579,"h":154.77832353115082},{"id":"b14c6de25717ff89","type":"junction","z":"6b22ce2a482c2d6d","g":"e1a45cd7394adb90","x":763.2055430412292,"y":217.22167646884918,"wires":[["8277b19f347ddcfb"]]},{"id":"35f156dc1adffb2e","type":"junction","z":"6b22ce2a482c2d6d","g":"e1a45cd7394adb90","x":1534.9184575080872,"y":217.51034879684448,"wires":[["b14c6de25717ff89"]]},{"id":"021e749ad389ab88","type":"erlsupervisor","z":"6b22ce2a482c2d6d","g":"abf8c9a905272f8e","name":"supervisor of loving grace","scope":["874cb18b3842747d","84927e2b99bfc27b"],"supervisor_type":"static","strategy":"one_for_all","auto_shutdown":"never","intensity":"5","period":"30","child_type":"worker","child_restart":"permanent","child_shutdown":"infinite","child_shutdown_timeout":"","x":1061,"y":445,"wires":[["29503cddc16de778"]]},{"id":"874cb18b3842747d","type":"function","z":"6b22ce2a482c2d6d","g":"abf8c9a905272f8e","name":"exit call","func":"exit(self(), failure_of_func)","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1016,"y":787.75,"wires":[[]]},{"id":"84927e2b99bfc27b","type":"function","z":"6b22ce2a482c2d6d","g":"abf8c9a905272f8e","name":"function 2","func":"maps:put(hello, world, Msg)\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1016,"y":891.5714285714286,"wires":[["f09b0ccfab4ddbf7"]]},{"id":"00404d33057120fb","type":"inject","z":"6b22ce2a482c2d6d","g":"eb4c717d536bec97","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":270,"y":787.75,"wires":[["b1e8a05edf9a1f49"]]},{"id":"b1e8a05edf9a1f49","type":"change","z":"6b22ce2a482c2d6d","g":"eb4c717d536bec97","name":"","rules":[{"p":"payload","pt":"msg","t":"set","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":589,"y":787.75,"wires":[["874cb18b3842747d","fa84ecd4d8a1c08d","ad82ec4cb4957dd2","84927e2b99bfc27b","f8fb4da6c8f33c06"]]},{"id":"fa84ecd4d8a1c08d","type":"delay","z":"6b22ce2a482c2d6d","g":"eb4c717d536bec97","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":592,"y":896,"wires":[["b1e8a05edf9a1f49"]]},{"id":"ad82ec4cb4957dd2","type":"debug","z":"6b22ce2a482c2d6d","name":"debug 5","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":795.7142715454102,"y":727.7143077850342,"wires":[]},{"id":"29503cddc16de778","type":"switch","z":"6b22ce2a482c2d6d","name":"what status?","property":"status","propertyType":"msg","rules":[{"t":"eq","v":"dead","vt":"str"},{"t":"eq","v":"started","vt":"str"},{"t":"eq","v":"restarted","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":1290,"y":445,"wires":[["5e74391f2b90b291","efac69a788e070b5","eaf756cb0b4d0e61"],["2c111f28540619e3"],["4a7406140d09ceb3"]]},{"id":"4a7406140d09ceb3","type":"debug","z":"6b22ce2a482c2d6d","name":"restarted counter","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":1617,"y":555,"wires":[]},{"id":"2c111f28540619e3","type":"debug","z":"6b22ce2a482c2d6d","name":"started counter","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":1607,"y":500,"wires":[]},{"id":"5e74391f2b90b291","type":"debug","z":"6b22ce2a482c2d6d","name":"dead counter","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":1597,"y":441,"wires":[]},{"id":"efac69a788e070b5","type":"delay","z":"6b22ce2a482c2d6d","g":"e1a45cd7394adb90","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":1453.4285888671875,"y":297.8571472167969,"wires":[["35f156dc1adffb2e"]]},{"id":"8277b19f347ddcfb","type":"change","z":"6b22ce2a482c2d6d","g":"e1a45cd7394adb90","name":"","rules":[{"p":"action","pt":"msg","t":"set","to":"restart","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":885.7142333984375,"y":305,"wires":[["021e749ad389ab88"]]},{"id":"7a6ae313d3d52f28","type":"ut-assert-success","z":"6b22ce2a482c2d6d","name":"","count":"0","x":803.7142944335938,"y":621.4285888671875,"wires":[]},{"id":"eaf756cb0b4d0e61","type":"ut-assert-success","z":"6b22ce2a482c2d6d","name":"","count":1,"x":1597,"y":384.5,"wires":[]},{"id":"f8fb4da6c8f33c06","type":"join","z":"6b22ce2a482c2d6d","name":"","mode":"custom","build":"array","property":"payload","propertyType":"full","key":"topic","joiner":"\\n","joinerType":"str","useparts":false,"accumulate":false,"timeout":"","count":"250","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":787,"y":681,"wires":[["7a6ae313d3d52f28"]]},{"id":"f09b0ccfab4ddbf7","type":"join","z":"6b22ce2a482c2d6d","name":"","mode":"custom","build":"array","property":"payload","propertyType":"full","key":"topic","joiner":"\\n","joinerType":"str","useparts":false,"accumulate":false,"timeout":"","count":"7","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1270,"y":891.5714285714286,"wires":[["70857ba136d3d197"]]},{"id":"70857ba136d3d197","type":"ut-assert-failure","z":"6b22ce2a482c2d6d","name":"","x":1597,"y":891.5714285714286,"wires":[]}]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"id":"d6c796491294233e","type":"tab","label":"[supervisor] supervising two function nodes","disabled":false,"info":"Simple exampe of using the supervisor node to revive a function node that dies because it does a divide by zero.\n\nThe inject node can be pressed five times[1] and after the supervisor dies - check the configuration of the supervisor node for why this happens.\n\nThe <a class=\"ahl-node-only\" data-ids=\"3c8c8d8fa8232bc4\">delay 500ms</a> node is there to ensure that the message goes through to the <a class=\"ahl-node-only\" data-ids=\"96713a5958600f3b\">Assert True</a> node before the <a class=\"ahl-node-only\" data-ids=\"66a17d54fe9f3bdd\">function 1</a> node is restarted because the divide by zero error <a class=\"ahl-node-only\" data-ids=\"373d6e3f9b852130\">node</a> fails.\n\n*NOTE* Not run as eunit test because it produces error messages about supervisors crashing - something that is meant to happen.\n\n[1]: Move a node, deploy the flow and then it's started. Inject button then has an affect.","env":[{"name":"ERED_NOT_EUNIT","value":"true","type":"bool"},{"name":"ERED_TIMEOUT","value":"4","type":"num"},{"name":"ERED_ONLY","value":"true","type":"bool"}]},{"id":"4c3356e96385c30b","type":"group","z":"d6c796491294233e","style":{"color":"#a4a4a4","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","stroke":"#999999","stroke-opacity":"1"},"nodes":["373d6e3f9b852130","66a17d54fe9f3bdd","7415aceb164005dd"],"x":469,"y":405.16668701171875,"w":232,"h":284.83331298828125},{"id":"373d6e3f9b852130","type":"function","z":"d6c796491294233e","g":"4c3356e96385c30b","name":"divide by zero error","func":"ered_nodered_comm:post_exception_or_debug(NodeDef, Msg, <<\"divide by zero\">>),\n1 / 0","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":585,"y":501.25,"wires":[["3f010ba469a458a6"]]},{"id":"ca0b875d707b9b25","type":"inject","z":"d6c796491294233e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":172,"y":649,"wires":[["66a17d54fe9f3bdd","3c8c8d8fa8232bc4"]]},{"id":"66a17d54fe9f3bdd","type":"function","z":"d6c796491294233e","g":"4c3356e96385c30b","name":"function 1","func":"maps:put(<<\"hello\">>,world,Msg)\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":585,"y":649,"wires":[["96713a5958600f3b"]]},{"id":"3f010ba469a458a6","type":"ut-assert-failure","z":"d6c796491294233e","name":"","x":834,"y":501.25,"wires":[]},{"id":"96713a5958600f3b","type":"ut-assert-success","z":"d6c796491294233e","name":"","count":1,"x":834,"y":649,"wires":[]},{"id":"33074a4c0243ec99","type":"catch","z":"d6c796491294233e","name":"","scope":["373d6e3f9b852130"],"uncaught":false,"x":298,"y":174,"wires":[["bf4ae0b0a489befb"]]},{"id":"bf4ae0b0a489befb","type":"ut-assert-success","z":"d6c796491294233e","name":"","count":1,"x":834,"y":174,"wires":[]},{"id":"079a3c0e58372482","type":"switch","z":"d6c796491294233e","name":"supervisor dead?","property":"status","propertyType":"msg","rules":[{"t":"eq","v":"dead","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":854,"y":353.25,"wires":[["b69e93448c758331"]]},{"id":"b69e93448c758331","type":"delay","z":"d6c796491294233e","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":585,"y":258.25,"wires":[["f085471e5c4dc05e"]]},{"id":"f085471e5c4dc05e","type":"change","z":"d6c796491294233e","name":"","rules":[{"p":"action","pt":"msg","t":"set","to":"restart","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":323,"y":353.25,"wires":[["7415aceb164005dd"]]},{"id":"7415aceb164005dd","type":"erlsupervisor","z":"d6c796491294233e","g":"4c3356e96385c30b","name":"","scope":["373d6e3f9b852130","66a17d54fe9f3bdd"],"supervisor_type":"static","strategy":"one_for_all","auto_shutdown":"never","intensity":"5","period":"30","child_type":"worker","child_restart":"permanent","child_shutdown":"brutal_kill","child_shutdown_timeout":"0","x":586.6666870117188,"y":446.16668701171875,"wires":[["079a3c0e58372482"]]},{"id":"3c8c8d8fa8232bc4","type":"delay","z":"d6c796491294233e","name":"","pauseType":"delay","timeout":"500","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":371,"y":562,"wires":[["373d6e3f9b852130"]]}]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"id":"cb538fcaaab76178","type":"tab","label":"[supervisor] supervisor loops","disabled":false,"info":"<small><i>[Share Link](https://flows.red-erik.org/f/cb538fcaaab76178)</i></small>\n\n## Supervisor loops\n\nSupervisor loops are not possible and Erlang-Red should error out.\n\n\n\nThis this flow the <a class=\"ahl-node-only\" data-ids=\"6aed3a08befb93aa\">first supervisor</a> is the supervisor of the <a class=\"ahl-node-only\" data-ids=\"bf3c14de41930be2\">second supervisor</a> which in turn is the supervisor of the <a class=\"ahl-node-only\" data-ids=\"923a99213caa43c4\">third supervisor</a> which is the supervisor of the <a class=\"ahl-node-only\" data-ids=\"a0451f2d039d8778\">fourth supervisor</a>, the <a class=\"ahl-node-only\" data-ids=\"19d8f8c07a31296c\">debug 2</a> node and the <a class=\"ahl-node-only\" data-ids=\"6b5f9bcec32f2b8b\">exit on message</a> function node.\n\nThat structure would be perfectly ok it weren't for the fact that the <a class=\"ahl-node-only\" data-ids=\"a0451f2d039d8778\">fourth supervisor</a> is also the supervisor of the <a class=\"ahl-node-only\" data-ids=\"6aed3a08befb93aa\">first supervisor</a> and that closes the loop.\n\nThis structure is not possible because it could well lead to an loop of restarts and failures or restarts of restarts.\n\n\n","env":[{"name":"ERED_TIMEOUT","value":"5","type":"num"},{"name":"ERED_PENDING","value":"true","type":"bool"},{"name":"ERED_ONLY","value":"true","type":"bool"}]},{"id":"923a99213caa43c4","type":"erlsupervisor","z":"cb538fcaaab76178","name":"third supervisor","scope":["6b5f9bcec32f2b8b","19d8f8c07a31296c","a0451f2d039d8778"],"supervisor_type":"static","strategy":"one_for_one","auto_shutdown":"never","intensity":"52","period":"20","child_type":"worker","child_restart":"permanent","child_shutdown":"infinite","child_shutdown_timeout":"0","x":1320.0000762939453,"y":324.3333535194397,"wires":[[]]},{"id":"6b5f9bcec32f2b8b","type":"function","z":"cb538fcaaab76178","name":"exit on message","func":"exit(self(), normal)","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1304.3334121704102,"y":401.66663932800293,"wires":[[]]},{"id":"fdd041cfd080c1d7","type":"inject","z":"cb538fcaaab76178","name":"Start Button","props":[{"p":"payload"},{"p":"msgcnt","v":"0","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":442.00000762939453,"y":408.33337593078613,"wires":[["aba46d81a0c32892"]]},{"id":"aba46d81a0c32892","type":"change","z":"cb538fcaaab76178","name":"","rules":[{"p":"payload","pt":"msg","t":"set","to":"","tot":"date"},{"p":"msgcnt","pt":"msg","t":"set","to":"$$.msgcnt + 1","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":647.3333511352539,"y":452.04089546203613,"wires":[["a276f161c4527b56","6b5f9bcec32f2b8b","5dc57e099c2e0630"]]},{"id":"a276f161c4527b56","type":"delay","z":"cb538fcaaab76178","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":839.333381652832,"y":526.4158954620361,"wires":[["85cd42cbfa36fb5d"]]},{"id":"85cd42cbfa36fb5d","type":"switch","z":"cb538fcaaab76178","name":"stop after 2000 messages","property":"msgcnt","propertyType":"msg","rules":[{"t":"lt","v":"2000","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":420.9999771118164,"y":529.4158954620361,"wires":[["aba46d81a0c32892"]]},{"id":"6aed3a08befb93aa","type":"erlsupervisor","z":"cb538fcaaab76178","name":"first supervisor","scope":["bf3c14de41930be2"],"supervisor_type":"static","strategy":"one_for_one","auto_shutdown":"never","intensity":"1000","period":"1","child_type":"worker","child_restart":"permanent","child_shutdown":"infinite","child_shutdown_timeout":"0","x":1073.3332061767578,"y":243.3333158493042,"wires":[[]]},{"id":"bf3c14de41930be2","type":"erlsupervisor","z":"cb538fcaaab76178","name":"second supervisor","scope":["923a99213caa43c4"],"supervisor_type":"static","strategy":"one_for_one","auto_shutdown":"never","intensity":"30","period":"30","child_type":"worker","child_restart":"permanent","child_shutdown":"infinite","child_shutdown_timeout":"0","x":1320.9997940063477,"y":242.66665649414062,"wires":[[]]},{"id":"a0451f2d039d8778","type":"erlsupervisor","z":"cb538fcaaab76178","name":"fourth supervisor","scope":["6aed3a08befb93aa"],"supervisor_type":"static","strategy":"one_for_one","auto_shutdown":"never","intensity":"1","period":"5","child_type":"worker","child_restart":"permanent","child_shutdown":"infinite","child_shutdown_timeout":"0","x":1088.666374206543,"y":328.9999294281006,"wires":[[]]},{"id":"5dc57e099c2e0630","type":"ut-assert-success","z":"cb538fcaaab76178","name":"","count":"2000","x":848.5714285714284,"y":322.85714285714283,"wires":[]}]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"id":"e447b0048a5983b5","type":"tab","label":"[supervisor] supervisor of supervisor of supervisor of ....","disabled":false,"info":"<small><i>[Share link](https://flows.red-erik.org/f/e447b0048a5983b5)</i></small>\n\n## Supervisors all the way down\n\nAn example of using supervisors to restart supervisors. This supercedes the [restart via message](https://flows.red-erik.org/f/6b22ce2a482c2d6d) or rather provides a simpler mechansim for restarting a supervisor. Both approaches are supported.\n\n## Setup\n\nThe core of this flow is the <a class=\"ahl-group-only\" data-ids=\"e1745dfaec070457\">root group</a> that contains the <a class=\"ahl-node-only\" data-ids=\"f9c30facfa98c063\">root supervisor</a> which is the last in a chain of supervisors. The root supervisor has an intensity of 1000 over a period of 1 second, i.e., it is designed to never fail.\n\nThe root supervisor supervises the <a class=\"ahl-node-only\" data-ids=\"b3e3826d7586da51\">one below root</a> supervisor that in turn supervises the <a class=\"ahl-node-only\" data-ids=\"c948d78b56ea338f\">two below root</a> supervisor which in turn supervises the <a class=\"ahl-node-only\" data-ids=\"49f8266870cf3ae4\">three below root</a> which finally supervises the <a class=\"ahl-node-only\" data-ids=\"0a384e288df2f95d\">supervisor controlling function node</a>.\n\nEach supervisor has an intensity and period configuration such that they eventually die and need to be restated by a supervisor. So it goes all the way up to the <a class=\"ahl-node-only\" data-ids=\"f9c30facfa98c063\">root supervisor</a> that ends up restarting the entire chain.\n\nThe node causing the failure is the <a class=\"ahl-node-only\" data-ids=\"ce7ad9dda79c3129\">function 1</a> which contains the single line of Erlang code: `exit(self(), failure)`.\n\n**Note**: each supervisor is set to restart policy of `permanent`.\n\nThe function node receives messages from the <a class=\"ahl-group-only\" data-ids=\"9f3b6edc8707cca5\">message generation</a> group that generates 2000 messages, all of which sent to the function and each time the function exits.\n\nThat exit also takes out the <a class=\"ahl-node-only\" data-ids=\"5208e18f1c766f81\">debug 11</a> node that is also supervised by the <a class=\"ahl-node-only\" data-ids=\"0a384e288df2f95d\">supervisor controlling function</a> node. That is way the debug message counter - as shown in the animation - never goes beyond 6 because the supervisor is configured with an intensity of five over a period of ten seconds. \n\n\n\nRemember the debug node is not restarted along with the function node because the <a class=\"ahl-node-only\" data-ids=\"0a384e288df2f95d\">supervisor controlling function node</a> is configured with a restart strategy `one-for-one` but because the supervisor falls down, the debug node is always restarted once the supervisor is restarted - hence the message counter reaches six. Also the sixth message kills the supervisor because the function is *allowed* to fail five times in ten seconds and the sixth failure causes the supervisor to collapse (in a smouldering heap of burning bits).\n\nIf the supervisor where to be configured with a restart strategy of `one-for-all`, then the message counter of the <a class=\"ahl-node-only\" data-ids=\"5208e18f1c766f81\">debug 11</a> would not go beyond 1 since the supervisor would also restart the debug node when it restarted the function node, i.e., on every message.\n\n## Testing \n\nThis flow also tests that features are working. For that there are two test groups: \n\n- <a class=\"ahl-group-only\" data-ids=\"dc497ddceb8383d6\">test that everything gets restarted</a> which ensures that supervisors are doing their job. What happens is that each join collects a number of messages before emitting one bundle of messages, this test then ensures that supervisors are restarting ofren enough. Each supervisor emits a message when it falls down, when it restarts and when it has started - these messages are being collected by the <a class=\"ahl-node-only\" data-ids=\"e57a8a3419e63a78\">join 82</a>, <a class=\"ahl-node-only\" data-ids=\"ecc61f0aaeff8032\">join 166</a> and <a class=\"ahl-node-only\" data-ids=\"f0249c7f877f7d7a\">join 332</a> nodes. The <a class=\"ahl-node-only\" data-ids=\"cd9ecea3aa8b07bc,28b2942d170ef74b,3e10f2f597dd4a09\">Assert True</a> nodes are reached once the joins emit their bundle message and the test succeeds.\n\n- <a class=\"ahl-group-only\" data-ids=\"59aa8abeaa454c6a\">test throughput on debug node</a> this ensures that the debug node is receiving all the messages even if it gets restarted. How it works is by counting the status changes of the <a class=\"ahl-node-only\" data-ids=\"5208e18f1c766f81\">debug 11</a> node using the <a class=\"ahl-node-only\" data-ids=\"f03f862514493696\">status: 1</a> node. **Note**, this only works because there is a <a class=\"ahl-node-only\" data-ids=\"095ceca669915bd5\">1ms delay</a> in message generation - else the debug node does actually drop messages, i.e., doesn't receive the message because the process has died and is being restarted. Erlang-Red does not buffer messages, it sends message to processes if these processes are alive else the messages get dropped.\n\n","env":[{"name":"ERED_NOT_EUNIT","value":"true","type":"bool"},{"name":"ERED_TIMEOUT","value":"9","type":"num"},{"name":"ERED_ONLY","value":"true","type":"bool"}]},{"id":"e1745dfaec070457","type":"group","z":"e447b0048a5983b5","style":{"color":"#a4a4a4","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","stroke":"#999999","stroke-opacity":"1"},"nodes":["f9c30facfa98c063","d0f7c225c63f6d61"],"x":752,"y":258,"w":596,"h":646},{"id":"9f3b6edc8707cca5","type":"group","z":"e447b0048a5983b5","name":"message generation","style":{"label":true},"nodes":["73f1c7593502aba5","095ceca669915bd5","ed7c19d0f90462ed"],"x":9.999969482421875,"y":676.70751953125,"w":650.3334045410156,"h":159.375},{"id":"dc497ddceb8383d6","type":"group","z":"e447b0048a5983b5","name":"test that everything gets restarted","style":{"label":true},"nodes":["e57a8a3419e63a78","3e10f2f597dd4a09","ecc61f0aaeff8032","28b2942d170ef74b","f0249c7f877f7d7a","cd9ecea3aa8b07bc","314987cdf92caa1a","4b3260fdeeac9dd1"],"x":1397,"y":88,"w":384,"h":337},{"id":"59aa8abeaa454c6a","type":"group","z":"e447b0048a5983b5","name":"test throughput on debug node","style":{"label":true},"nodes":["f03f862514493696","0827c3cdcf01b0cc","a3cb2e180d1d3398"],"x":268,"y":61,"w":585,"h":165},{"id":"d0f7c225c63f6d61","type":"group","z":"e447b0048a5983b5","g":"e1745dfaec070457","name":"","style":{"label":true},"nodes":["b3e3826d7586da51","7ff1906324f48abf"],"x":795.8337938785553,"y":330,"w":526.1662061214447,"h":548},{"id":"7ff1906324f48abf","type":"group","z":"e447b0048a5983b5","g":"d0f7c225c63f6d61","style":{"color":"#a4a4a4","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","stroke":"#999999","stroke-opacity":"1"},"nodes":["c948d78b56ea338f","b70b7d859dbc5968"],"x":821.8337938785553,"y":398.5,"w":474.1662061214447,"h":453.5},{"id":"b70b7d859dbc5968","type":"group","z":"e447b0048a5983b5","g":"7ff1906324f48abf","style":{"color":"#a4a4a4","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","stroke":"#999999","stroke-opacity":"1"},"nodes":["49f8266870cf3ae4","4ce371d78f1421dc"],"x":847.8337938785553,"y":467,"w":422.1662061214447,"h":359},{"id":"4ce371d78f1421dc","type":"group","z":"e447b0048a5983b5","g":"b70b7d859dbc5968","style":{"color":"#a4a4a4","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","stroke":"#999999","stroke-opacity":"1"},"nodes":["0a384e288df2f95d","ce7ad9dda79c3129","5208e18f1c766f81","9e76b4cbd5c0a78c"],"x":873.8337938785553,"y":542,"w":370.1662061214447,"h":258},{"id":"9e76b4cbd5c0a78c","type":"junction","z":"e447b0048a5983b5","g":"4ce371d78f1421dc","x":899.8337938785553,"y":719.6326316595078,"wires":[["ce7ad9dda79c3129","5208e18f1c766f81"]]},{"id":"f9c30facfa98c063","type":"erlsupervisor","z":"e447b0048a5983b5","g":"e1745dfaec070457","name":"root supervisor","scope":["b3e3826d7586da51"],"supervisor_type":"static","strategy":"one_for_one","auto_shutdown":"never","intensity":"1000","period":"1","child_type":"supervisor","child_restart":"permanent","child_shutdown":"infinite","child_shutdown_timeout":"0","x":858,"y":299,"wires":[["314987cdf92caa1a"]]},{"id":"b3e3826d7586da51","type":"erlsupervisor","z":"e447b0048a5983b5","g":"d0f7c225c63f6d61","name":"one below root","scope":["c948d78b56ea338f"],"supervisor_type":"static","strategy":"one_for_one","auto_shutdown":"never","intensity":"1","period":"1","child_type":"supervisor","child_restart":"permanent","child_shutdown":"infinite","child_shutdown_timeout":"0","x":918,"y":371,"wires":[["e57a8a3419e63a78"]]},{"id":"c948d78b56ea338f","type":"erlsupervisor","z":"e447b0048a5983b5","g":"7ff1906324f48abf","name":"two below root","scope":["49f8266870cf3ae4"],"supervisor_type":"static","strategy":"one_for_one","auto_shutdown":"never","intensity":"1","period":"6","child_type":"supervisor","child_restart":"permanent","child_shutdown":"infinite","child_shutdown_timeout":"0","x":946,"y":439.5,"wires":[["ecc61f0aaeff8032"]]},{"id":"49f8266870cf3ae4","type":"erlsupervisor","z":"e447b0048a5983b5","g":"b70b7d859dbc5968","name":"three below root","scope":["0a384e288df2f95d"],"supervisor_type":"static","strategy":"one_for_one","auto_shutdown":"never","intensity":"1","period":"10","child_type":"supervisor","child_restart":"permanent","child_shutdown":"infinite","child_shutdown_timeout":"0","x":978,"y":508,"wires":[["f0249c7f877f7d7a"]]},{"id":"0a384e288df2f95d","type":"erlsupervisor","z":"e447b0048a5983b5","g":"4ce371d78f1421dc","name":"supervisor controlling function node","scope":["ce7ad9dda79c3129","5208e18f1c766f81"],"supervisor_type":"static","strategy":"one_for_one","auto_shutdown":"never","intensity":"5","period":"10","child_type":"worker","child_restart":"permanent","child_shutdown":"brutal_kill","child_shutdown_timeout":"0","x":1068,"y":583,"wires":[[]]},{"id":"ce7ad9dda79c3129","type":"function","z":"e447b0048a5983b5","g":"4ce371d78f1421dc","name":"function 1","func":"%% Code here is wrapped in a fun (Msg) call\n%% fun (Msg) ->\n exit(self(), failure)\n%% end.\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1068,"y":675,"wires":[[]]},{"id":"86123a4378f7fe05","type":"inject","z":"e447b0048a5983b5","name":"Start Button","props":[{"p":"payload"},{"p":"msgcnt","v":"0","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":156,"y":446,"wires":[["73f1c7593502aba5"]]},{"id":"73f1c7593502aba5","type":"change","z":"e447b0048a5983b5","g":"9f3b6edc8707cca5","name":"","rules":[{"p":"payload","pt":"msg","t":"set","to":"","tot":"date"},{"p":"msgcnt","pt":"msg","t":"set","to":"$$.msgcnt + 1","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":372.3333435058594,"y":717.70751953125,"wires":[["095ceca669915bd5","9e76b4cbd5c0a78c","35309d41a6ba48c7","154c53ab47611271"]]},{"id":"095ceca669915bd5","type":"delay","z":"e447b0048a5983b5","g":"9f3b6edc8707cca5","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":564.3333740234375,"y":792.08251953125,"wires":[["ed7c19d0f90462ed"]]},{"id":"ed7c19d0f90462ed","type":"switch","z":"e447b0048a5983b5","g":"9f3b6edc8707cca5","name":"stop after 2000 messages","property":"msgcnt","propertyType":"msg","rules":[{"t":"lt","v":"2000","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":145.99996948242188,"y":795.08251953125,"wires":[["73f1c7593502aba5"]]},{"id":"5208e18f1c766f81","type":"debug","z":"e447b0048a5983b5","g":"4ce371d78f1421dc","name":"debug 11","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":1072,"y":759,"wires":[]},{"id":"f03f862514493696","type":"status","z":"e447b0048a5983b5","g":"59aa8abeaa454c6a","name":"","scope":["5208e18f1c766f81"],"x":354,"y":185,"wires":[["0827c3cdcf01b0cc","1c538e85c7a78e99"]]},{"id":"e57a8a3419e63a78","type":"join","z":"e447b0048a5983b5","g":"dc497ddceb8383d6","name":"atleast","mode":"custom","build":"array","property":"","propertyType":"full","key":"topic","joiner":"\\n","joinerType":"str","useparts":false,"accumulate":false,"timeout":"","count":"82","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1483,"y":214,"wires":[["3e10f2f597dd4a09"]]},{"id":"3e10f2f597dd4a09","type":"ut-assert-success","z":"e447b0048a5983b5","g":"dc497ddceb8383d6","name":"","count":1,"x":1665,"y":214,"wires":[]},{"id":"ecc61f0aaeff8032","type":"join","z":"e447b0048a5983b5","g":"dc497ddceb8383d6","name":"atleast","mode":"custom","build":"array","property":"","propertyType":"full","key":"topic","joiner":"\\n","joinerType":"str","useparts":false,"accumulate":false,"timeout":"","count":"166","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1493,"y":299,"wires":[["28b2942d170ef74b"]]},{"id":"28b2942d170ef74b","type":"ut-assert-success","z":"e447b0048a5983b5","g":"dc497ddceb8383d6","name":"","count":1,"x":1665,"y":299,"wires":[]},{"id":"f0249c7f877f7d7a","type":"join","z":"e447b0048a5983b5","g":"dc497ddceb8383d6","name":"atleast","mode":"custom","build":"array","property":"","propertyType":"full","key":"topic","joiner":"\\n","joinerType":"str","useparts":false,"accumulate":false,"timeout":"","count":"332","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1493,"y":384,"wires":[["cd9ecea3aa8b07bc"]]},{"id":"cd9ecea3aa8b07bc","type":"ut-assert-success","z":"e447b0048a5983b5","g":"dc497ddceb8383d6","name":"","count":1,"x":1665,"y":384,"wires":[]},{"id":"0827c3cdcf01b0cc","type":"join","z":"e447b0048a5983b5","g":"59aa8abeaa454c6a","name":"atleast","mode":"custom","build":"array","property":"","propertyType":"full","key":"topic","joiner":"\\n","joinerType":"str","useparts":false,"accumulate":false,"timeout":"","count":"1900","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":556,"y":102,"wires":[["a3cb2e180d1d3398"]]},{"id":"a3cb2e180d1d3398","type":"ut-assert-success","z":"e447b0048a5983b5","g":"59aa8abeaa454c6a","name":"","count":1,"x":737,"y":102,"wires":[]},{"id":"314987cdf92caa1a","type":"join","z":"e447b0048a5983b5","g":"dc497ddceb8383d6","name":"no more","mode":"custom","build":"array","property":"","propertyType":"full","key":"topic","joiner":"\\n","joinerType":"str","useparts":false,"accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1483,"y":129,"wires":[["4b3260fdeeac9dd1"]]},{"id":"4b3260fdeeac9dd1","type":"ut-assert-failure","z":"e447b0048a5983b5","g":"dc497ddceb8383d6","name":"","x":1665,"y":129,"wires":[]},{"id":"154c53ab47611271","type":"ut-assert-success","z":"e447b0048a5983b5","name":"","count":"2000","x":622.8571548461914,"y":589.9999656677246,"wires":[]},{"id":"35309d41a6ba48c7","type":"debug","z":"e447b0048a5983b5","name":"debug 10","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":552.3333740234375,"y":428,"wires":[]},{"id":"1c538e85c7a78e99","type":"debug","z":"e447b0048a5983b5","name":"debug 1","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":551,"y":364,"wires":[]}]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"id":"6ec0c8870821dd63","type":"tab","label":"[supervisor] supervisor told to stop","disabled":false,"info":"## Supervisor of Supervisor pattern but Supervisor told to stop\n\nA failed function causes the stopping of a Supervisor node.\n\nWhat is being tested is whether a supervisor node also shuts down its children if its told to shut down.\n\n## Setup\n\n<a class=\"ahl-group-only\" data-ids=\"8888af65a8124288\">Message generator</a> generates two thousand messages. On each message, the <a class=\"ahl-node-only\" data-ids=\"d91c3d741e4de4e4\">immediate exit on message</a> function node fails causing its supervisor, the <a class=\"ahl-node-only\" data-ids=\"10639227f336a097\">supervisor - one-for-all</a> to restart the <a class=\"ahl-node-only\" data-ids=\"23a54af76e9c10a5\">delegate delegate supervisor</a> as the restart policy is `one-for-all`.\n\nThe <a class=\"ahl-node-only\" data-ids=\"23a54af76e9c10a5\">delegate delegate supervisor</a> is in charge of the <a class=\"ahl-node-only\" data-ids=\"8c14e760dcfb8a30\">function 4</a> and <a class=\"ahl-node-only\" data-ids=\"6b0a05f3bf443478\">function 5</a> nodes. These are stopped when the <a class=\"ahl-node-only\" data-ids=\"23a54af76e9c10a5\">delegate delegate supervisor</a> is stopped.\n\nAt the end of the, a <a class=\"ahl-node-only\" data-ids=\"ad54fc1b6369b67c\">join 12</a> node is collecting together messages and sends out one new message once it has twelve messages. The <a class=\"ahl-node-only\" data-ids=\"a553ec7831d634cf\">Assert True</a> node ensures this happens. \n\nThe <a class=\"ahl-node-only\" data-ids=\"8332808443914f76\">join 13</a> node does the same but collects thirteen messages but thirteen messages are never collected because the supervisor tree shuts down before that happens.\n\nThat is becausae <a class=\"ahl-node-only\" data-ids=\"10639227f336a097\">supervisor - one-for-all</a> has an intenisty of 5 over 30 seconds. Our message generator is generating a message every milliseconds, so in 30 seconds its about 30 thousand messages.\n\nHence the supervisor dies on the sixth message. It gets restarted by the <a class=\"ahl-node-only\" data-ids=\"76ecfec8634cfaa2\">root supervisor</a> but it has an intenisty of 1 over 5 seconds. That means it restarts the <a class=\"ahl-node-only\" data-ids=\"10639227f336a097\">supervisor - one-for-all</a> only once before it dies.\n\nHence only 12 messages get through at the bottom of the tree.\n\nP.S. Because of timings and process coordination, the actual number of messages that get through ranges between 10 and 12 but never thirteen, hence this test is built for this.\n\n## Supervision tree\n\n```mermaid\n%% change this to LR Node-RED like UML\ngraph TB\n30d125fb8f0bf61e@{ shape: \"rect\", label: \"root supervisor\" } --> 7f4686d2611f0e7f@{ shape: \"rect\", label: \"supervisor - one-for-all\" }\n7f4686d2611f0e7f@{ shape: \"rect\", label: \"supervisor - one-for-all\" } --> a430a1c9ee80461d@{ shape: \"rect\", label: \"delegate delegate supervisor\" }\n7f4686d2611f0e7f@{ shape: \"rect\", label: \"supervisor - one-for-all\" } --> b824c1367a13ab7c@{ shape: \"fr-rect\", label: \"immediate exit on message\" }\na430a1c9ee80461d@{ shape: \"rect\", label: \"delegate delegate supervisor\" } --> 21a4bb05caaf505c@{ shape: \"fr-rect\", label: \"function 4\" }\na430a1c9ee80461d@{ shape: \"rect\", label: \"delegate delegate supervisor\" } --> 208eafc5ccf9d41c@{ shape: \"fr-rect\", label: \"function 5\" }\n```","env":[{"name":"ERED_TIMEOUT","value":"6","type":"num"},{"name":"ERED_NOT_EUNIT","value":"true","type":"bool"},{"name":"ERED_ONLY","value":"true","type":"bool"}]},{"id":"8888af65a8124288","type":"group","z":"6ec0c8870821dd63","name":"message generation","style":{"label":true},"nodes":["df2d629bd128f867","5548fa01589ebce1","24a06060a85b8d53"],"x":130.6666259765625,"y":378.678594827652,"w":650.3334045410156,"h":160.36309218406677},{"id":"10639227f336a097","type":"erlsupervisor","z":"6ec0c8870821dd63","name":"supervisor - one-for-all","scope":["d91c3d741e4de4e4","23a54af76e9c10a5"],"supervisor_type":"static","strategy":"one_for_all","auto_shutdown":"never","intensity":"5","period":"30","child_type":"worker","child_restart":"permanent","child_shutdown":"brutal_kill","child_shutdown_timeout":"0","x":1287.2856674194336,"y":300.5714225769043,"wires":[[]]},{"id":"d91c3d741e4de4e4","type":"function","z":"6ec0c8870821dd63","name":"immediate exit on message","func":"exit(self(), failure)","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1042.9999389648438,"y":419.678594827652,"wires":[["33d1c8fe5c3f3cf8"]]},{"id":"23a54af76e9c10a5","type":"erlsupervisor","z":"6ec0c8870821dd63","name":"delegate delegate supervisor","scope":["8c14e760dcfb8a30","6b0a05f3bf443478"],"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":1500.714225769043,"y":419.678594827652,"wires":[[]]},{"id":"8c14e760dcfb8a30","type":"function","z":"6ec0c8870821dd63","name":"function 4","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":1401.5713081359863,"y":525.3214206695557,"wires":[["6b0a05f3bf443478"]]},{"id":"6b0a05f3bf443478","type":"function","z":"6ec0c8870821dd63","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":1622.9284706115723,"y":525.3214206695557,"wires":[["fc37dbca860bf3ae"]]},{"id":"76ecfec8634cfaa2","type":"erlsupervisor","z":"6ec0c8870821dd63","name":"root supervisor","scope":["10639227f336a097"],"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":1281.1428298950195,"y":156.5714569091797,"wires":[[]]},{"id":"33d1c8fe5c3f3cf8","type":"ut-assert-failure","z":"6ec0c8870821dd63","name":"","x":1291.857089996338,"y":419.678594827652,"wires":[]},{"id":"df2d629bd128f867","type":"change","z":"6ec0c8870821dd63","g":"8888af65a8124288","name":"","rules":[{"p":"payload","pt":"msg","t":"set","to":"","tot":"date"},{"p":"msgcnt","pt":"msg","t":"set","to":"$$.msgcnt + 1","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":493,"y":419.678594827652,"wires":[["5548fa01589ebce1","d91c3d741e4de4e4","8c14e760dcfb8a30","c7753da3244b0bb5"]]},{"id":"5548fa01589ebce1","type":"delay","z":"6ec0c8870821dd63","g":"8888af65a8124288","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":685.0000305175781,"y":495.04168701171875,"wires":[["24a06060a85b8d53"]]},{"id":"24a06060a85b8d53","type":"switch","z":"6ec0c8870821dd63","g":"8888af65a8124288","name":"stop after 2000 messages","property":"msgcnt","propertyType":"msg","rules":[{"t":"lt","v":"2000","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":266.6666259765625,"y":498.04168701171875,"wires":[["df2d629bd128f867"]]},{"id":"3ef7c89152d98002","type":"inject","z":"6ec0c8870821dd63","name":"","props":[{"p":"msgcnt","v":"0","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":278,"y":313,"wires":[["df2d629bd128f867"]]},{"id":"fc37dbca860bf3ae","type":"ut-assert-success","z":"6ec0c8870821dd63","name":"","count":"0","x":1854.2856330871582,"y":525.3214206695557,"wires":[]},{"id":"c7753da3244b0bb5","type":"ut-assert-success","z":"6ec0c8870821dd63","name":"","count":"2000","x":1019.5,"y":523,"wires":[]}]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"id":"83c5e1824f32abec","type":"tab","label":"[supervisor] supervisor tree","disabled":false,"info":"<small><i>[Share link](https://flows.red-erik.org/f/83c5e1824f32abec)</i></small>\n\n## Supervisor Tree\n\nThis is a typical data bus flow with various components sampling from the data bus. Each component is supervised by a supervisor node ensuring that the overall architecture is self-healing.\n\n<i>Note this flow is a specialised form of the [supervisor for supervisor for supervisor for ...](https://flows.red-erik.org/f/e447b0048a5983b5) flow. More details there on how these test flows work.</i>\n\nThe <a class=\"ahl-group-only\" data-ids=\"a2a7e74a4af61408\">message generator</a> generates random message that flow along the <a class='ahl-link-node' data-ids='42854c33d24cc147,2034061e36a4f15f,2034061e36a4f15f,902a3ee2db441271,260e4be19268b1a6,902a3ee2db441271,f6220844d7d6beb1'>data bus</a> (horizontal line extending out from the <a class=\"ahl-node-only\" data-ids=\"42854c33d24cc147\">change: 2 rules</a> node).\n\n## Supervisor behaviour\n\nThe supersivor node is implemented using the Erlang [supervisor behaviour](https://www.erlang.org/doc/apps/stdlib/supervisor.html).\n\n## Setup\n\nThe <a class=\"ahl-node-only\" data-ids=\"1af8ba70d5a3524f\">root supervisor</a> supervises the <a class=\"ahl-node-only\" data-ids=\"393f1b779c6091f6\">right branch</a> supervisor and the <a class=\"ahl-node-only\" data-ids=\"fa5012a137b001d9\">left branch</a> supervisor and ensures either is restarted using the `one-for-one` restart strategy.\n\nSince the left and right branches of this tree have nothing to do with one another, using the `one-for-one` restart strategy ensures that the failure of one branch does not influence the other branch.\n\nAlternatively shutting down the <a class=\"ahl-node-only\" data-ids=\"1af8ba70d5a3524f\">root supervisor</a> will ensure that the entire flow is shutdown. So the flow has a single on/off switch.\n\nThe <a class=\"ahl-node-only\" data-ids=\"fa5012a137b001d9\">left branch</a> supervisor is in control of <a class=\"ahl-group-only\" data-ids=\"876cb4e6a0e13e60\">this group of nodes</a> including a <a class=\"ahl-node-only\" data-ids=\"96ae99eb5ff0f75e\">sub-supervisor leaf left</a>. The <a class=\"ahl-node-only\" data-ids=\"96ae99eb5ff0f75e\">leaf left</a> supervisor manages this <a class=\"ahl-group-only\" data-ids=\"7a32d11ddf48f390\">group of nodes</a>.\n\nThe <a class=\"ahl-node-only\" data-ids=\"393f1b779c6091f6\">right branch</a> supervisor supervisese these <a class=\"ahl-group-only\" data-ids=\"61bf066466ccf6c9\">nodes</a> which also includes a sub-supervisor called <a class=\"ahl-node-only\" data-ids=\"579f89501d19b608\">leaf right</a> which manages these <a class=\"ahl-group-only\" data-ids=\"198c5ec84a4303d3\">nodes</a>.\n\nAs in other supervisor test flows, the <a class=\"ahl-node-only\" data-ids=\"2be5de12297e37e8,b2079d01bc6083b3,77db69c180d41d6f\">exit</a> function nodes exit immediately upon receiving a message thus causing their respective supervisors to restart them. The <a class=\"ahl-node-only\" data-ids=\"f05dfd8751fd199d,da885704f8719ad6,0fbbd20588aed361,c9d06322583751b1,9b4dec78a245edbd,871aea169f73c835\">msg counter</a> nodes simply count the number of messages they have received. These counts are reset if the debug node is restarted.\n\nA single <a class=\"ahl-node-only\" data-ids=\"4f3ae8c1ef6c1cd7\">function node</a> does something differently and instead it just passes through the messages it receives. Difference are the spice of life.\n\n## Why is this important?\n\nOne thing to remember is that even though this flow is simply a test using placeholder <a class=\"ahl-node-only\" data-ids=\"2be5de12297e37e8,b2079d01bc6083b3,4f3ae8c1ef6c1cd7,77db69c180d41d6f\">function nodes</a>, these function nodes can easily (drag & drop & deploy) be replaced by MQTT out nodes. The <a class=\"ahl-group-only\" data-ids=\"a2a7e74a4af61408\">message generator</a> can similarly be replaced by an MQTT in node and nothing else changes. The supervisors remain the same, the debug (msg counter nodes) can stay.\n\nThe only difference would be that it would suddenly be a production ready data pipeline that any good Erlang architect would put together - in textual form.\n\nThe nodes use the same Erlang concepts and behaviours as any Erlang programmer would create using their favourite textual tool.\n\nThe only other difference is that one can *see* the data pipeline and one can even sample from the pipeline using some extra tooling (those batteries aren't included here).\n\nBut as most folks prefer to imagine a better future, visualising that future isn't half as much fun.\n\n## UML-like visual representation of the visual representation\n\nThis flow implements the following supervisor tree:\n\n```mermaid\n%% change this to LR Node-RED like UML\ngraph TB\n1af8ba70d5a3524f[\"root supervisor\"] --> fa5012a137b001d9[\"left branch\"]\n1af8ba70d5a3524f[\"root supervisor\"] --> 393f1b779c6091f6[\"right branch\"]\n393f1b779c6091f6[\"right branch\"] --> f05dfd8751fd199d([\"msg counter right branch\"])\n393f1b779c6091f6[\"right branch\"] --> 2be5de12297e37e8([\"exit\"])\n393f1b779c6091f6[\"right branch\"] --> 579f89501d19b608[\"leaf right\"]\nfa5012a137b001d9[\"left branch\"] --> 4f3ae8c1ef6c1cd7([\"pass Msg through\"])\nfa5012a137b001d9[\"left branch\"] --> 96ae99eb5ff0f75e[\"leaf left\"]\nfa5012a137b001d9[\"left branch\"] --> c9d06322583751b1([\"msg count left branch\"])\n579f89501d19b608[\"leaf right\"] --> da885704f8719ad6([\"msg counter right leaf top\"])\n579f89501d19b608[\"leaf right\"] --> b2079d01bc6083b3([\"exit\"])\n579f89501d19b608[\"leaf right\"] --> 0fbbd20588aed361([\"msg counter right leaf bottom\"])\n96ae99eb5ff0f75e[\"leaf left\"] --> 9b4dec78a245edbd([\"msg count left left top\"])\n96ae99eb5ff0f75e[\"leaf left\"] --> 77db69c180d41d6f([\"exit\"])\n96ae99eb5ff0f75e[\"leaf left\"] --> 871aea169f73c835([\"msg count left left bottom\"])\n```\n\n## Other behaviours\n\n- [Event handler](https://flows.red-erik.org/f/b70a7ce34819e4d5)\n- [State machine](https://flows.red-erik.org/f/5672fa442b2b881d)","env":[{"name":"ERED_TIMEOUT","value":"10","type":"num"},{"name":"ERED_NOT_EUNIT","value":"true","type":"bool"},{"name":"ERED_ONLY","value":"true","type":"bool"}]},{"id":"10ad535c44495df5","type":"group","z":"83c5e1824f32abec","style":{"color":"#a4a4a4","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","stroke":"#999999","stroke-opacity":"1"},"nodes":["1af8ba70d5a3524f","393f1b779c6091f6","fa5012a137b001d9"],"x":1297,"y":469,"w":1153,"h":240},{"id":"61bf066466ccf6c9","type":"group","z":"83c5e1824f32abec","style":{"color":"#a4a4a4","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","stroke":"#999999","stroke-opacity":"1"},"nodes":["2be5de12297e37e8","f05dfd8751fd199d","579f89501d19b608"],"x":2313,"y":723,"w":384,"h":186},{"id":"198c5ec84a4303d3","type":"group","z":"83c5e1824f32abec","style":{"color":"#a4a4a4","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","stroke":"#999999","stroke-opacity":"1"},"nodes":["b2079d01bc6083b3","0fbbd20588aed361","da885704f8719ad6"],"x":2511,"y":967,"w":392,"h":228},{"id":"876cb4e6a0e13e60","type":"group","z":"83c5e1824f32abec","style":{"color":"#a4a4a4","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","stroke":"#999999","stroke-opacity":"1"},"nodes":["4f3ae8c1ef6c1cd7","c9d06322583751b1","96ae99eb5ff0f75e","2034061e36a4f15f"],"x":1064.1674642562866,"y":815,"w":428.8325357437134,"h":381.5},{"id":"7a32d11ddf48f390","type":"group","z":"83c5e1824f32abec","style":{"color":"#a4a4a4","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","stroke":"#999999","stroke-opacity":"1"},"nodes":["77db69c180d41d6f","9b4dec78a245edbd","871aea169f73c835"],"x":1596,"y":1033,"w":340,"h":241},{"id":"a2a7e74a4af61408","type":"group","z":"83c5e1824f32abec","name":"message generator","style":{"label":true},"nodes":["42854c33d24cc147","d5267b01ad627817","783c38c513ee2063","3d86e58d1499701d","33e9669d5da36116"],"x":103,"y":806,"w":745.3333740234375,"h":263.08251953125},{"id":"f6220844d7d6beb1","type":"junction","z":"83c5e1824f32abec","x":2163.1428351402283,"y":1085,"wires":[["da885704f8719ad6","b2079d01bc6083b3","0fbbd20588aed361"]]},{"id":"2034061e36a4f15f","type":"junction","z":"83c5e1824f32abec","g":"876cb4e6a0e13e60","x":1090.1674642562866,"y":950.70751953125,"wires":[["c9d06322583751b1","4f3ae8c1ef6c1cd7","902a3ee2db441271"]]},{"id":"902a3ee2db441271","type":"junction","z":"83c5e1824f32abec","x":2076.000049829483,"y":950.70751953125,"wires":[["f6220844d7d6beb1","260e4be19268b1a6"]]},{"id":"260e4be19268b1a6","type":"junction","z":"83c5e1824f32abec","x":2163.1428351402283,"y":818,"wires":[["2be5de12297e37e8","f05dfd8751fd199d"]]},{"id":"42854c33d24cc147","type":"change","z":"83c5e1824f32abec","g":"a2a7e74a4af61408","name":"","rules":[{"p":"payload","pt":"msg","t":"set","to":"","tot":"date"},{"p":"msgcnt","pt":"msg","t":"set","to":"$$.msgcnt + 1","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":465.3333740234375,"y":950.70751953125,"wires":[["d5267b01ad627817","783c38c513ee2063","2034061e36a4f15f"]]},{"id":"d5267b01ad627817","type":"delay","z":"83c5e1824f32abec","g":"a2a7e74a4af61408","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":694.3334045410156,"y":1025.08251953125,"wires":[["3d86e58d1499701d"]]},{"id":"783c38c513ee2063","type":"debug","z":"83c5e1824f32abec","g":"a2a7e74a4af61408","name":"debug 6","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":742.3333740234375,"y":847,"wires":[]},{"id":"3d86e58d1499701d","type":"switch","z":"83c5e1824f32abec","g":"a2a7e74a4af61408","name":"stop after 2000 messages","property":"msgcnt","propertyType":"msg","rules":[{"t":"lt","v":"2023","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":239,"y":1028.08251953125,"wires":[["42854c33d24cc147"]]},{"id":"1af8ba70d5a3524f","type":"erlsupervisor","z":"83c5e1824f32abec","g":"10ad535c44495df5","name":"root supervisor","scope":["393f1b779c6091f6","fa5012a137b001d9"],"supervisor_type":"static","strategy":"one_for_one","auto_shutdown":"never","intensity":"1000","period":"1","child_type":"worker","child_restart":"permanent","child_shutdown":"infinite","child_shutdown_timeout":"0","x":1818,"y":510,"wires":[[]]},{"id":"393f1b779c6091f6","type":"erlsupervisor","z":"83c5e1824f32abec","g":"10ad535c44495df5","name":"right branch","scope":["2be5de12297e37e8","f05dfd8751fd199d","579f89501d19b608"],"supervisor_type":"static","strategy":"one_for_one","auto_shutdown":"never","intensity":"233","period":"30","child_type":"worker","child_restart":"permanent","child_shutdown":"infinite","child_shutdown_timeout":"5","x":2354,"y":668,"wires":[["39bd5634461fab43"]]},{"id":"2be5de12297e37e8","type":"function","z":"83c5e1824f32abec","g":"61bf066466ccf6c9","name":"exit","func":"exit(self(), failure)","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2389,"y":764,"wires":[[]]},{"id":"b2079d01bc6083b3","type":"function","z":"83c5e1824f32abec","g":"198c5ec84a4303d3","name":"exit","func":"exit(self(), failure)","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2587,"y":1085,"wires":[[]]},{"id":"f05dfd8751fd199d","type":"debug","z":"83c5e1824f32abec","g":"61bf066466ccf6c9","name":"msg counter right branch","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":2486,"y":818,"wires":[]},{"id":"0fbbd20588aed361","type":"debug","z":"83c5e1824f32abec","g":"198c5ec84a4303d3","name":"msg counter right leaf bottom","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":2727,"y":1154,"wires":[]},{"id":"579f89501d19b608","type":"erlsupervisor","z":"83c5e1824f32abec","g":"61bf066466ccf6c9","name":"leaf right","scope":["da885704f8719ad6","b2079d01bc6083b3","0fbbd20588aed361"],"supervisor_type":"static","strategy":"rest_for_one","auto_shutdown":"never","intensity":"133","period":"10","child_type":"worker","child_restart":"permanent","child_shutdown":"brutal_kill","child_shutdown_timeout":"5","x":2611,"y":868,"wires":[[]]},{"id":"da885704f8719ad6","type":"debug","z":"83c5e1824f32abec","g":"198c5ec84a4303d3","name":"msg counter right leaf top","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":2695,"y":1008,"wires":[]},{"id":"4f3ae8c1ef6c1cd7","type":"function","z":"83c5e1824f32abec","g":"876cb4e6a0e13e60","name":"pass Msg through","func":"Msg","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1289,"y":1155.5,"wires":[["9b4dec78a245edbd","77db69c180d41d6f","871aea169f73c835","b5340bbb2ab54e07"]]},{"id":"c9d06322583751b1","type":"debug","z":"83c5e1824f32abec","g":"876cb4e6a0e13e60","name":"msg count left branch","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":1347,"y":856,"wires":[]},{"id":"96ae99eb5ff0f75e","type":"erlsupervisor","z":"83c5e1824f32abec","g":"876cb4e6a0e13e60","name":"leaf left","scope":["9b4dec78a245edbd","77db69c180d41d6f","871aea169f73c835"],"supervisor_type":"static","strategy":"one_for_all","auto_shutdown":"never","intensity":"127","period":"10","child_type":"worker","child_restart":"permanent","child_shutdown":"brutal_kill","child_shutdown_timeout":"5","x":1376,"y":1068,"wires":[[]]},{"id":"77db69c180d41d6f","type":"function","z":"83c5e1824f32abec","g":"7a32d11ddf48f390","name":"exit","func":"exit(self(), failure)","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1672,"y":1155.5,"wires":[[]]},{"id":"9b4dec78a245edbd","type":"debug","z":"83c5e1824f32abec","g":"7a32d11ddf48f390","name":"msg count left left top","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":1769,"y":1233,"wires":[]},{"id":"871aea169f73c835","type":"debug","z":"83c5e1824f32abec","g":"7a32d11ddf48f390","name":"msg count left left bottom","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":1780,"y":1074,"wires":[]},{"id":"fa5012a137b001d9","type":"erlsupervisor","z":"83c5e1824f32abec","g":"10ad535c44495df5","name":"left branch","scope":["4f3ae8c1ef6c1cd7","96ae99eb5ff0f75e","c9d06322583751b1"],"supervisor_type":"static","strategy":"rest_for_one","auto_shutdown":"never","intensity":"233","period":"30","child_type":"worker","child_restart":"permanent","child_shutdown":"infinite","child_shutdown_timeout":"5","x":1393,"y":659,"wires":[[]]},{"id":"33e9669d5da36116","type":"inject","z":"83c5e1824f32abec","g":"a2a7e74a4af61408","name":"Start Button","props":[{"p":"payload"},{"p":"msgcnt","v":"0","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":262,"y":856,"wires":[["42854c33d24cc147"]]},{"id":"b5340bbb2ab54e07","type":"ut-assert-success","z":"83c5e1824f32abec","name":"","count":"2023","x":1640.5715789794922,"y":1338.3571014404297,"wires":[]},{"id":"39bd5634461fab43","type":"ut-assert-success","z":"83c5e1824f32abec","name":"","count":"24","x":2720.714500427246,"y":612.5000371932983,"wires":[]}]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"id":"7444a788860dd588","type":"tab","label":"[supervisor] two supervisors cannot supervise the same nodes","disabled":false,"info":"<small><i>[Share link](https://flows.red-erik.org/f/7444a788860dd588)</i></small>\n\n## Supervising same nodes\n\nHere the <a class=\"ahl-node-only\" data-ids=\"8cf83b208e89d91f\">supervisor</a> on the left fails because it wants to supervise the same three nodes as the <a class=\"ahl-node-only\" data-ids=\"cb99647226dc6873\">supervisor</a> on the right which does start.\n\nIn fact it is unclear which supervisor will fail because it depends on the initialisation sequence.\n\nHowever one will fail because it is not possible to supervise the same nodes via two different (nor two *same*) supervisors.\n\nErlang supports monitoring two separate processes of the same codebase by providing the same [start parameters](https://www.erlang.org/doc/system/sup_princ.html#child-specification) in the definition of children.\n\nThe equivalent in Erlang-Red would be to copy & paste an existing node and have the copy being suprvised by another supervisor - code duplication done visually.\n\nThis raises an interesting aspect of visual programming: code duplication. Does the ideas of [DRY](https://en.wikipedia.org/wiki/Don't_repeat_yourself) actually apply to visual programming?\n\nAnswer is: No, they don't.\n\nCopying code visually is perfectly ok *provided* one is absolutely sure that code won't be altered again.\n\nQuestion: how does one know the code won't be altered again? Answer: Experience.\n\n","env":[{"name":"ERED_ONLY","value":"true","type":"bool"}]},{"id":"8cf83b208e89d91f","type":"erlsupervisor","z":"7444a788860dd588","name":"left supervisor","scope":["2453ef161a859858","486a9779dc4ed6a5","749aa6b2a5e2813d"],"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":410.66665267944336,"y":379.666627407074,"wires":[[]]},{"id":"2453ef161a859858","type":"switch","z":"7444a788860dd588","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":562,"y":535,"wires":[[]]},{"id":"486a9779dc4ed6a5","type":"function","z":"7444a788860dd588","name":"function 1","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":566,"y":491,"wires":[[]]},{"id":"749aa6b2a5e2813d","type":"change","z":"7444a788860dd588","name":"","rules":[{"p":"payload","pt":"msg","t":"set","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":565,"y":582,"wires":[[]]},{"id":"cb99647226dc6873","type":"erlsupervisor","z":"7444a788860dd588","name":"right supervisor","scope":["2453ef161a859858","486a9779dc4ed6a5","749aa6b2a5e2813d"],"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":754.0000228881836,"y":393.6666679382324,"wires":[[]]}]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"id":"05a47f94321ed67e","type":"tab","label":"[supervisor] unsupported configrations","disabled":false,"info":"## User Interface\n\nClearly indicate whether a supervisor configuration is supported or not.","env":[{"name":"ERED_PENDING","value":"false","type":"bool"},{"name":"ERED_NOT_EUNIT","value":"true","type":"bool"},{"name":"ERED_ONLY","value":"true","type":"bool"}]},{"id":"0deaa822bdca14f3","type":"group","z":"05a47f94321ed67e","name":"not supported configurations","style":{"label":true},"nodes":["50392eef4dd28a98","09f47d51e29f1147","ce1f7dda43c3a284","456864c3796a15ac","eafc72fec37ef25e","c4f4bf57e287beef"],"x":327.6666259765625,"y":238.6666717529297,"w":232,"h":370},{"id":"50392eef4dd28a98","type":"erlsupervisor","z":"05a47f94321ed67e","d":true,"g":"0deaa822bdca14f3","name":"","scope":null,"supervisor_type":"static","strategy":"one_for_one","auto_shutdown":"never","intensity":"1","period":"5","x":443.6666259765625,"y":279.6666717529297,"wires":[[]]},{"id":"09f47d51e29f1147","type":"erlsupervisor","z":"05a47f94321ed67e","d":true,"g":"0deaa822bdca14f3","name":"","scope":null,"supervisor_type":"dynamic","strategy":"one_for_one","auto_shutdown":"any_significant","intensity":"1","period":"5","x":443.6666259765625,"y":336.1666717529297,"wires":[[]]},{"id":"ce1f7dda43c3a284","type":"erlsupervisor","z":"05a47f94321ed67e","d":true,"g":"0deaa822bdca14f3","name":"","scope":"flow","supervisor_type":"dynamic","strategy":"one_for_one","auto_shutdown":"never","intensity":"10","period":"30","x":443.6666259765625,"y":454.6666717529297,"wires":[[]]},{"id":"456864c3796a15ac","type":"erlsupervisor","z":"05a47f94321ed67e","d":true,"g":"0deaa822bdca14f3","name":"","scope":"group","supervisor_type":"dynamic","strategy":"one_for_one","auto_shutdown":"never","intensity":"10","period":"30","x":443.6666259765625,"y":511.1666717529297,"wires":[[]]},{"id":"eafc72fec37ef25e","type":"erlsupervisor","z":"05a47f94321ed67e","d":true,"g":"0deaa822bdca14f3","name":"","scope":"flow","supervisor_type":"dynamic","strategy":"one_for_one","auto_shutdown":"never","intensity":"1","period":"5","x":443.6666259765625,"y":567.6666717529297,"wires":[[]]},{"id":"c4f4bf57e287beef","type":"erlsupervisor","z":"05a47f94321ed67e","d":true,"g":"0deaa822bdca14f3","name":"","scope":"flow","supervisor_type":"dynamic","strategy":"one_for_one","auto_shutdown":"never","intensity":"1","period":"5","x":443.6666259765625,"y":392.6666717529297,"wires":[[]]},{"id":"5ef1e10acd1ef147","type":"inject","z":"05a47f94321ed67e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":281,"y":716,"wires":[["f9b63a71e68681f0"]]},{"id":"f9b63a71e68681f0","type":"ut-assert-success","z":"05a47f94321ed67e","name":"","count":1,"x":715,"y":711.5,"wires":[]}]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"id":"9942fa1aeb1b2428","type":"tab","label":"[switch] JSONata undefined value & exceptions","disabled":false,"info":"## What happens with JSONata result is undefined?\n\nThe only value that matches is `is null` for an undefined value in JSONata.\n\nWhat happens if the JSONata stanza is in error but at runtime?","env":[{"name":"NODE_RED_DIVERGENT","value":"true","type":"bool"}]},{"id":"199386de1f8d0b26","type":"group","z":"9942fa1aeb1b2428","name":"invalid JSONata stanza as property to check against","style":{"label":true},"nodes":["b77637f8d2cf275e","e0d79226c256fba7","639bfb064cb9a1b0","1aac37181e9199c1","5a777e9e4671f290","bea644861571de7c","eaaf5126503dee9f","e6f7ea380e167f62","57b76009ceaf2f44","0545a24dd6a9bed7","6f9d22eef60f83c0","6214c2a00e7550fc"],"x":1000,"y":124,"w":823,"h":682},{"id":"095fb4627c140119","type":"group","z":"9942fa1aeb1b2428","name":"invalid JSONata stanza as property to check against","style":{"label":true},"nodes":["00c047659d5dbc95","7b9c699e33a65d39","a87613d1a8562a64","a1d2d70259b74abf","fe92a602e3813db8","7345143768c0a247","160de08859c4a5e3","feafd3649014bfab","947d682562ee8c40","7a529fb88b614b74","c62b20a4d4905b49","987e86048f782eee"],"x":1002.5,"y":1352.5,"w":823,"h":706},{"id":"d25fadc270655483","type":"group","z":"9942fa1aeb1b2428","name":"JSONata as field type","style":{"label":true},"nodes":["1b86e50802681fd8","2a1e1e18b1bdc778"],"x":1834,"y":572,"w":1730,"h":474.00002034505223},{"id":"c4690892cc9015ad","type":"group","z":"9942fa1aeb1b2428","name":"JSONata as rule operator","style":{"label":true},"nodes":["2471e07080841ae7","53300cc6a277013b"],"x":1836.4287109375,"y":61.428565979003906,"w":1730,"h":474.0000203450521},{"id":"124bc1ad94cb23e5","type":"group","z":"9942fa1aeb1b2428","name":"JSONata as rule operator","style":{"label":true},"nodes":["556156e102e73804","8293d2234fecbed8"],"x":1883.5,"y":1291,"w":1732,"h":413},{"id":"c66766891e9c9701","type":"group","z":"9942fa1aeb1b2428","name":"JSONata as field type","style":{"label":true},"nodes":["004ba979caee84d8","e4c37bace09b5a4b"],"x":1882.285888671875,"y":1750.71435546875,"w":1752,"h":413},{"id":"1f20f08de37f7131","type":"group","z":"9942fa1aeb1b2428","name":"JSONata produces an undefined value","style":{"label":true},"nodes":["2c867a9d03379f5a","ecba7c047b16c199","13e3ac4d41044a4f","f425ab69290c3f35","5548c0aea846610c","ebf2a754a54c2879","8a46b76b4bdb907c","3fec0a85b5ebe591","15ca188eebbded5c","bfeb35a2b25b13ec","388d526d8b5bc65f","b74874da3cc77fe5"],"x":112,"y":124,"w":808,"h":565},{"id":"b31b246f6078a7fa","type":"group","z":"9942fa1aeb1b2428","name":"JSONata produces an undefined value","style":{"label":true},"nodes":["d312c33b49855c32","11d72e400487bab0","a8c8c15a45430e5f","3b3eb3dd3938871a","06d8610bc474af1a","c36a634373dec16c","14a0e8512a9393e4","69ba2357e97a16e6","60881c68cf92f227","05fbce3f65e95def","e5527783b9bcd9e1","651ce4cd24a96813"],"x":112,"y":1431.9999593098958,"w":805,"h":540.8571898142498},{"id":"2471e07080841ae7","type":"group","z":"9942fa1aeb1b2428","g":"c4690892cc9015ad","name":"invalid JSONata stanza as rule value - before match","style":{"label":true},"nodes":["dffbdccb4839b1b2","050353ded7981963","eb5b381efed62930","555535b72a413553","9afb6e63cb5604cb","3461c3ef26234ac8","6e9e325f4664e4eb","76743090d2555fde"],"x":1862.4287109375,"y":87.4285659790039,"w":820,"h":410},{"id":"53300cc6a277013b","type":"group","z":"9942fa1aeb1b2428","g":"c4690892cc9015ad","name":"invalid JSONata stanza as rule value - after match","style":{"label":true},"nodes":["dfc0c4b73ba963aa","6735c45edbb34c8b","1b7d81e38e3d5141","99e0d84f124ea910","5555564f777e5fdd","aabab4db0bd44f2a","9cdf0af0c29dcbc2","93a0c887ef8a3e70"],"x":2720.4287109375,"y":92.428586324056,"w":820,"h":417},{"id":"556156e102e73804","type":"group","z":"9942fa1aeb1b2428","g":"124bc1ad94cb23e5","name":"invalid JSONata stanza as rule value - after match","style":{"label":true},"nodes":["423e0bde8dded2cd","89ef46ed5db8127a","1bcf8390328e5b16","8a46f8ca2822cad2","39521ca6f0582e9e","0c0adfed2b928cd6","1a361cb294fd717f","e4267133256b2fa9"],"x":2795.5,"y":1317,"w":794,"h":357},{"id":"8293d2234fecbed8","type":"group","z":"9942fa1aeb1b2428","g":"124bc1ad94cb23e5","name":"invalid JSONata stanza as rule value - before match","style":{"label":true},"nodes":["fa4d9c24770444b3","edb3595a348ab634","6c7cc9a6ca7cd4f3","4ad5eab07763e233","1d85976b4b0e687c","4be742290f829cc5","c424cd1b9ee2a594","f9104297e8353b18"],"x":1909.5,"y":1321,"w":794,"h":357},{"id":"1b86e50802681fd8","type":"group","z":"9942fa1aeb1b2428","g":"d25fadc270655483","name":"invalid JSONata stanza as rule value - before match","style":{"label":true},"nodes":["b16b105563ef1765","be4884d1ef8c9327","b711fd378e663278","2a533aeb5cd07897","db505fb0b0997fb3","5b68102fe81fe789","c700b88cea604319","0121100f46b9a2f6"],"x":1860,"y":598,"w":820,"h":417},{"id":"2a1e1e18b1bdc778","type":"group","z":"9942fa1aeb1b2428","g":"d25fadc270655483","name":"invalid JSONata stanza as rule value - after match","style":{"label":true},"nodes":["0cd730c8ce078dfa","5c0214cf09248149","b7619d367f6362ac","f43af69646ed8372","8f0fcbc0ddf91a18","e8931d22befdbdfb","d067e5695140c3f5","d215047493c59c5f"],"x":2718,"y":603.0000203450521,"w":820,"h":417},{"id":"004ba979caee84d8","type":"group","z":"9942fa1aeb1b2428","g":"c66766891e9c9701","name":"invalid JSONata stanza as field type - after match","style":{"label":true},"nodes":["85e62996aecce136","64f7f0f05384dd8f","2abc796939081ff2","35a13e7f0f9fad1d","b6c05e8822a98be7","0a48f56a9fc05666","db7504914c7f096a","61837ad6a12064f4"],"x":2794.285888671875,"y":1776.71435546875,"w":814,"h":357},{"id":"e4c37bace09b5a4b","type":"group","z":"9942fa1aeb1b2428","g":"c66766891e9c9701","name":"invalid JSONata stanza as field type - before match","style":{"label":true},"nodes":["1958d237b3d1f43f","fea71c0eb266ec97","e63fa7e2ca1762ea","7ddb97124682abbd","4e05f68a4f62fc0a","986a3a304382c511","60b072c35d4771da","8f3b143dd63ade9d"],"x":1908.285888671875,"y":1780.71435546875,"w":814,"h":357},{"id":"987e86048f782eee","type":"group","z":"9942fa1aeb1b2428","g":"095fb4627c140119","name":"Node-RED diverge","style":{"fill":"#bfdbef","label":true,"color":"#9363b7"},"nodes":["509e5a34a29f7ff3"],"x":1607.5,"y":1950.5,"w":192,"h":82},{"id":"6214c2a00e7550fc","type":"group","z":"9942fa1aeb1b2428","g":"199386de1f8d0b26","name":"Node-RED diverge","style":{"fill":"#bfdbef","label":true,"color":"#9363b7"},"nodes":["4e0a3736aee9a07c"],"x":1605,"y":698,"w":192,"h":82},{"id":"93a0c887ef8a3e70","type":"group","z":"9942fa1aeb1b2428","g":"53300cc6a277013b","name":"Node-RED diverge","style":{"fill":"#bfdbef","label":true,"color":"#9363b7"},"nodes":["e7b6437b94874bf1"],"x":3322.4287109375,"y":194,"w":192,"h":82},{"id":"d215047493c59c5f","type":"group","z":"9942fa1aeb1b2428","g":"2a1e1e18b1bdc778","name":"Node-RED diverge","style":{"fill":"#bfdbef","label":true,"color":"#9363b7"},"nodes":["25531b16d5ca4356"],"x":3320,"y":708,"w":192,"h":82},{"id":"76743090d2555fde","type":"group","z":"9942fa1aeb1b2428","g":"2471e07080841ae7","name":"Node-RED diverge","style":{"fill":"#bfdbef","label":true,"color":"#9363b7"},"nodes":["e608bd8005f3e593"],"x":2464.4287109375,"y":240,"w":192,"h":82},{"id":"0121100f46b9a2f6","type":"group","z":"9942fa1aeb1b2428","g":"1b86e50802681fd8","name":"Node-RED diverge","style":{"fill":"#bfdbef","label":true,"color":"#9363b7"},"nodes":["56169ac1105b2469"],"x":2462,"y":755,"w":192,"h":82},{"id":"2c867a9d03379f5a","type":"switch","z":"9942fa1aeb1b2428","g":"1f20f08de37f7131","name":"check all tests","property":"$match($$.payload, /([0-9]+)([a-z]+)([0-9]+)([a-z]+)/,0)","propertyType":"jsonata","rules":[{"t":"eq","v":"","vt":"str"},{"t":"true"},{"t":"false"},{"t":"null"},{"t":"empty"},{"t":"nempty"},{"t":"jsonata_exp","v":"$match($$.payload, /([0-9]+)([a-z]+)([0-9]+)([a-z]+)/,0)","vt":"jsonata"},{"t":"nnull"}],"checkall":"true","repair":false,"outputs":8,"x":502,"y":378,"wires":[["f425ab69290c3f35"],["5548c0aea846610c"],["ebf2a754a54c2879"],["13e3ac4d41044a4f"],["8a46b76b4bdb907c"],["3fec0a85b5ebe591"],["15ca188eebbded5c"],["bfeb35a2b25b13ec"]]},{"id":"ecba7c047b16c199","type":"inject","z":"9942fa1aeb1b2428","g":"1f20f08de37f7131","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"111","payloadType":"str","x":208,"y":165,"wires":[["2c867a9d03379f5a"]]},{"id":"13e3ac4d41044a4f","type":"ut-assert-success","z":"9942fa1aeb1b2428","g":"1f20f08de37f7131","name":"","count":1,"x":824,"y":372,"wires":[]},{"id":"f425ab69290c3f35","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"1f20f08de37f7131","name":"","x":824,"y":165,"wires":[]},{"id":"5548c0aea846610c","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"1f20f08de37f7131","name":"","x":824,"y":234,"wires":[]},{"id":"ebf2a754a54c2879","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"1f20f08de37f7131","name":"","x":824,"y":303,"wires":[]},{"id":"8a46b76b4bdb907c","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"1f20f08de37f7131","name":"","x":824,"y":441,"wires":[]},{"id":"3fec0a85b5ebe591","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"1f20f08de37f7131","name":"","x":824,"y":510,"wires":[]},{"id":"15ca188eebbded5c","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"1f20f08de37f7131","name":"","x":824,"y":579,"wires":[]},{"id":"d312c33b49855c32","type":"switch","z":"9942fa1aeb1b2428","g":"b31b246f6078a7fa","name":"stop after first match","property":"$match($$.payload, /([0-9]+)([a-z]+)([0-9]+)([a-z]+)/,0)","propertyType":"jsonata","rules":[{"t":"eq","v":"","vt":"str"},{"t":"true"},{"t":"false"},{"t":"empty"},{"t":"nempty"},{"t":"jsonata_exp","v":"$match($$.payload, /([0-9]+)([a-z]+)([0-9]+)([a-z]+)/,0)","vt":"jsonata"},{"t":"nnull"},{"t":"null"}],"checkall":"false","repair":false,"outputs":8,"x":519,"y":1670,"wires":[["3b3eb3dd3938871a"],["06d8610bc474af1a"],["c36a634373dec16c"],["14a0e8512a9393e4"],["69ba2357e97a16e6"],["60881c68cf92f227"],["05fbce3f65e95def"],["a8c8c15a45430e5f"]]},{"id":"11d72e400487bab0","type":"inject","z":"9942fa1aeb1b2428","g":"b31b246f6078a7fa","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"111","payloadType":"str","x":208,"y":1472.9999593098958,"wires":[["d312c33b49855c32"]]},{"id":"a8c8c15a45430e5f","type":"ut-assert-success","z":"9942fa1aeb1b2428","g":"b31b246f6078a7fa","name":"","count":1,"x":821,"y":1931.8571491241455,"wires":[]},{"id":"3b3eb3dd3938871a","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"b31b246f6078a7fa","name":"","x":821,"y":1472.9999593098958,"wires":[]},{"id":"06d8610bc474af1a","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"b31b246f6078a7fa","name":"","x":821,"y":1538.5509864262172,"wires":[]},{"id":"c36a634373dec16c","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"b31b246f6078a7fa","name":"","x":821,"y":1604.1020135425385,"wires":[]},{"id":"14a0e8512a9393e4","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"b31b246f6078a7fa","name":"","x":821,"y":1669.65304065886,"wires":[]},{"id":"69ba2357e97a16e6","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"b31b246f6078a7fa","name":"","x":821,"y":1735.2040677751813,"wires":[]},{"id":"60881c68cf92f227","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"b31b246f6078a7fa","name":"","x":821,"y":1800.7550948915027,"wires":[]},{"id":"bfeb35a2b25b13ec","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"1f20f08de37f7131","name":"","x":824,"y":648,"wires":[]},{"id":"05fbce3f65e95def","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"b31b246f6078a7fa","name":"","x":821,"y":1866.3061220078241,"wires":[]},{"id":"b77637f8d2cf275e","type":"switch","z":"9942fa1aeb1b2428","g":"199386de1f8d0b26","name":"check all tests","property":"$match($$.payload, /./,-1)","propertyType":"jsonata","rules":[{"t":"eq","v":"","vt":"str"},{"t":"true"},{"t":"false"},{"t":"null"},{"t":"empty"},{"t":"nempty"},{"t":"jsonata_exp","v":"$match($$.payload, /([0-9]+)([a-z]+)([0-9]+)([a-z]+)/,0)","vt":"jsonata"},{"t":"nnull"}],"checkall":"true","repair":false,"outputs":8,"x":1385,"y":438,"wires":[["639bfb064cb9a1b0"],["1aac37181e9199c1"],["5a777e9e4671f290"],["0545a24dd6a9bed7"],["bea644861571de7c"],["eaaf5126503dee9f"],["e6f7ea380e167f62"],["57b76009ceaf2f44"]]},{"id":"e0d79226c256fba7","type":"inject","z":"9942fa1aeb1b2428","g":"199386de1f8d0b26","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"111","payloadType":"str","x":1096,"y":165,"wires":[["b77637f8d2cf275e"]]},{"id":"639bfb064cb9a1b0","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"199386de1f8d0b26","name":"","x":1701,"y":165,"wires":[]},{"id":"1aac37181e9199c1","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"199386de1f8d0b26","name":"","x":1701,"y":234,"wires":[]},{"id":"5a777e9e4671f290","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"199386de1f8d0b26","name":"","x":1701,"y":303,"wires":[]},{"id":"bea644861571de7c","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"199386de1f8d0b26","name":"","x":1701,"y":441,"wires":[]},{"id":"eaaf5126503dee9f","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"199386de1f8d0b26","name":"","x":1701,"y":510,"wires":[]},{"id":"e6f7ea380e167f62","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"199386de1f8d0b26","name":"","x":1701,"y":579,"wires":[]},{"id":"57b76009ceaf2f44","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"199386de1f8d0b26","name":"","x":1701,"y":648,"wires":[]},{"id":"0545a24dd6a9bed7","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"199386de1f8d0b26","name":"","x":1701,"y":375,"wires":[]},{"id":"6f9d22eef60f83c0","type":"catch","z":"9942fa1aeb1b2428","g":"199386de1f8d0b26","name":"","scope":["b77637f8d2cf275e"],"uncaught":false,"x":1104,"y":739,"wires":[["4e0a3736aee9a07c"]]},{"id":"dffbdccb4839b1b2","type":"switch","z":"9942fa1aeb1b2428","g":"2471e07080841ae7","name":"check all tests","property":"payload","propertyType":"msg","rules":[{"t":"false"},{"t":"jsonata_exp","v":"$match($$.payload, /./,-1)","vt":"jsonata"},{"t":"eq","v":"111","vt":"str"},{"t":"jsonata_exp","v":"$match($$.payload, /([0-9]+)([a-z]+)([0-9]+)([a-z]+)/,0)","vt":"jsonata"}],"checkall":"true","repair":false,"outputs":4,"x":2247.4287109375,"y":241.4285659790039,"wires":[["eb5b381efed62930"],["555535b72a413553"],["e608bd8005f3e593"],["9afb6e63cb5604cb"]]},{"id":"050353ded7981963","type":"inject","z":"9942fa1aeb1b2428","g":"2471e07080841ae7","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"111","payloadType":"str","x":1958.4287109375,"y":128.4285659790039,"wires":[["dffbdccb4839b1b2"]]},{"id":"eb5b381efed62930","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"2471e07080841ae7","name":"","x":2560.4287109375,"y":146.4285659790039,"wires":[]},{"id":"555535b72a413553","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"2471e07080841ae7","name":"","x":2560.4287109375,"y":200.09523264567056,"wires":[]},{"id":"9afb6e63cb5604cb","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"2471e07080841ae7","name":"","x":2560.4287109375,"y":360.4285659790039,"wires":[]},{"id":"3461c3ef26234ac8","type":"catch","z":"9942fa1aeb1b2428","g":"2471e07080841ae7","name":"","scope":["dffbdccb4839b1b2"],"uncaught":false,"x":1958.4287109375,"y":456.4285659790039,"wires":[["6e9e325f4664e4eb"]]},{"id":"dfc0c4b73ba963aa","type":"switch","z":"9942fa1aeb1b2428","g":"53300cc6a277013b","name":"check all tests","property":"payload","propertyType":"msg","rules":[{"t":"false"},{"t":"eq","v":"111","vt":"str"},{"t":"jsonata_exp","v":"$match($$.payload, /./,-1)","vt":"jsonata"},{"t":"jsonata_exp","v":"$match($$.payload, /([0-9]+)([a-z]+)([0-9]+)([a-z]+)/,0)","vt":"jsonata"}],"checkall":"true","repair":false,"outputs":4,"x":3105.4287109375,"y":242.4285888671875,"wires":[["1b7d81e38e3d5141"],["e7b6437b94874bf1"],["5555564f777e5fdd"],["aabab4db0bd44f2a"]]},{"id":"6735c45edbb34c8b","type":"inject","z":"9942fa1aeb1b2428","g":"53300cc6a277013b","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"111","payloadType":"str","x":2816.4287109375,"y":133.428586324056,"wires":[["dfc0c4b73ba963aa"]]},{"id":"1b7d81e38e3d5141","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"53300cc6a277013b","name":"","x":3418.4287109375,"y":151.428586324056,"wires":[]},{"id":"99e0d84f124ea910","type":"catch","z":"9942fa1aeb1b2428","g":"53300cc6a277013b","name":"","scope":["dfc0c4b73ba963aa"],"uncaught":false,"x":2816.4287109375,"y":468.428586324056,"wires":[["9cdf0af0c29dcbc2"]]},{"id":"423e0bde8dded2cd","type":"switch","z":"9942fa1aeb1b2428","g":"556156e102e73804","name":"stop after first match","property":"payload","propertyType":"msg","rules":[{"t":"false"},{"t":"eq","v":"111","vt":"str"},{"t":"jsonata_exp","v":"$match($$.payload, /./,-1)","vt":"jsonata"},{"t":"jsonata_exp","v":"$match($$.payload, /([0-9]+)([a-z]+)([0-9]+)([a-z]+)/,0)","vt":"jsonata"}],"checkall":"false","repair":false,"outputs":4,"x":3200.5,"y":1471,"wires":[["1bcf8390328e5b16"],["e4267133256b2fa9"],["8a46f8ca2822cad2"],["39521ca6f0582e9e"]]},{"id":"89ef46ed5db8127a","type":"inject","z":"9942fa1aeb1b2428","g":"556156e102e73804","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"111","payloadType":"str","x":2891.5,"y":1358,"wires":[["423e0bde8dded2cd"]]},{"id":"1bcf8390328e5b16","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"556156e102e73804","name":"","x":3493.5,"y":1376,"wires":[]},{"id":"8a46f8ca2822cad2","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"556156e102e73804","name":"","x":3493.5,"y":1483.3333333333335,"wires":[]},{"id":"39521ca6f0582e9e","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"556156e102e73804","name":"","x":3493.5,"y":1537,"wires":[]},{"id":"0c0adfed2b928cd6","type":"catch","z":"9942fa1aeb1b2428","g":"556156e102e73804","name":"","scope":["423e0bde8dded2cd"],"uncaught":false,"x":3179.5,"y":1633,"wires":[["1a361cb294fd717f"]]},{"id":"1a361cb294fd717f","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"556156e102e73804","name":"","x":3493.5,"y":1633,"wires":[]},{"id":"fa4d9c24770444b3","type":"switch","z":"9942fa1aeb1b2428","g":"8293d2234fecbed8","name":"stop after first match","property":"payload","propertyType":"msg","rules":[{"t":"false"},{"t":"jsonata_exp","v":"$match($$.payload, /./,-1)","vt":"jsonata"},{"t":"eq","v":"111","vt":"str"},{"t":"jsonata_exp","v":"$match($$.payload, /([0-9]+)([a-z]+)([0-9]+)([a-z]+)/,0)","vt":"jsonata"}],"checkall":"false","repair":false,"outputs":4,"x":2314.5,"y":1481,"wires":[["6c7cc9a6ca7cd4f3"],["4ad5eab07763e233"],["4be742290f829cc5"],["1d85976b4b0e687c"]]},{"id":"edb3595a348ab634","type":"inject","z":"9942fa1aeb1b2428","g":"8293d2234fecbed8","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"111","payloadType":"str","x":2005.5,"y":1362,"wires":[["fa4d9c24770444b3"]]},{"id":"6c7cc9a6ca7cd4f3","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"8293d2234fecbed8","name":"","x":2607.5,"y":1380,"wires":[]},{"id":"4ad5eab07763e233","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"8293d2234fecbed8","name":"","x":2607.5,"y":1433.6666666666665,"wires":[]},{"id":"1d85976b4b0e687c","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"8293d2234fecbed8","name":"","x":2607.5,"y":1541,"wires":[]},{"id":"4be742290f829cc5","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"8293d2234fecbed8","name":"","x":2607.5,"y":1487.3333333333333,"wires":[]},{"id":"c424cd1b9ee2a594","type":"catch","z":"9942fa1aeb1b2428","g":"8293d2234fecbed8","name":"","scope":["fa4d9c24770444b3"],"uncaught":false,"x":2270.5,"y":1637,"wires":[["f9104297e8353b18"]]},{"id":"00c047659d5dbc95","type":"switch","z":"9942fa1aeb1b2428","g":"095fb4627c140119","name":"stop after first match","property":"$match($$.payload, /./,-1)","propertyType":"jsonata","rules":[{"t":"eq","v":"","vt":"str"},{"t":"true"},{"t":"false"},{"t":"null"},{"t":"empty"},{"t":"nempty"},{"t":"jsonata_exp","v":"$match($$.payload, /([0-9]+)([a-z]+)([0-9]+)([a-z]+)/,0)","vt":"jsonata"},{"t":"nnull"}],"checkall":"false","repair":false,"outputs":8,"x":1407.5,"y":1662.5,"wires":[["a87613d1a8562a64"],["a1d2d70259b74abf"],["fe92a602e3813db8"],["7a529fb88b614b74"],["7345143768c0a247"],["160de08859c4a5e3"],["feafd3649014bfab"],["947d682562ee8c40"]]},{"id":"7b9c699e33a65d39","type":"inject","z":"9942fa1aeb1b2428","g":"095fb4627c140119","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"111","payloadType":"str","x":1098.5,"y":1393.5,"wires":[["00c047659d5dbc95"]]},{"id":"a87613d1a8562a64","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"095fb4627c140119","name":"","x":1703.5,"y":1393.5,"wires":[]},{"id":"a1d2d70259b74abf","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"095fb4627c140119","name":"","x":1703.5,"y":1462.5,"wires":[]},{"id":"fe92a602e3813db8","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"095fb4627c140119","name":"","x":1703.5,"y":1531.5,"wires":[]},{"id":"7345143768c0a247","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"095fb4627c140119","name":"","x":1703.5,"y":1669.5,"wires":[]},{"id":"160de08859c4a5e3","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"095fb4627c140119","name":"","x":1703.5,"y":1738.5,"wires":[]},{"id":"feafd3649014bfab","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"095fb4627c140119","name":"","x":1703.5,"y":1807.5,"wires":[]},{"id":"947d682562ee8c40","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"095fb4627c140119","name":"","x":1703.5,"y":1876.5,"wires":[]},{"id":"7a529fb88b614b74","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"095fb4627c140119","name":"","x":1703.5,"y":1603.5,"wires":[]},{"id":"c62b20a4d4905b49","type":"catch","z":"9942fa1aeb1b2428","g":"095fb4627c140119","name":"","scope":["00c047659d5dbc95"],"uncaught":false,"x":1086.5,"y":1991.5,"wires":[["509e5a34a29f7ff3"]]},{"id":"f9104297e8353b18","type":"ut-assert-success","z":"9942fa1aeb1b2428","g":"8293d2234fecbed8","name":"","count":1,"x":2607.5,"y":1637,"wires":[]},{"id":"e4267133256b2fa9","type":"ut-assert-success","z":"9942fa1aeb1b2428","g":"556156e102e73804","name":"","count":1,"x":3493.5,"y":1429.6666666666667,"wires":[]},{"id":"6e9e325f4664e4eb","type":"ut-assert-success","z":"9942fa1aeb1b2428","g":"2471e07080841ae7","name":"","count":1,"x":2560.4287109375,"y":456.4285659790039,"wires":[]},{"id":"b16b105563ef1765","type":"switch","z":"9942fa1aeb1b2428","g":"1b86e50802681fd8","name":"check all tests","property":"payload","propertyType":"msg","rules":[{"t":"false"},{"t":"eq","v":"$match($$.payload, /./,-1)","vt":"jsonata"},{"t":"eq","v":"111","vt":"str"},{"t":"eq","v":"$match($$.payload, /([0-9]+)([a-z]+)([0-9]+)([a-z]+)/,0)","vt":"jsonata"}],"checkall":"true","repair":false,"outputs":4,"x":2245,"y":752,"wires":[["b711fd378e663278"],["2a533aeb5cd07897"],["56169ac1105b2469"],["db505fb0b0997fb3"]]},{"id":"be4884d1ef8c9327","type":"inject","z":"9942fa1aeb1b2428","g":"1b86e50802681fd8","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"111","payloadType":"str","x":1956,"y":639,"wires":[["b16b105563ef1765"]]},{"id":"b711fd378e663278","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"1b86e50802681fd8","name":"","x":2558,"y":657,"wires":[]},{"id":"2a533aeb5cd07897","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"1b86e50802681fd8","name":"","x":2558,"y":710.6666666666666,"wires":[]},{"id":"db505fb0b0997fb3","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"1b86e50802681fd8","name":"","x":2558,"y":878,"wires":[]},{"id":"5b68102fe81fe789","type":"catch","z":"9942fa1aeb1b2428","g":"1b86e50802681fd8","name":"","scope":["b16b105563ef1765"],"uncaught":false,"x":2244,"y":974,"wires":[["c700b88cea604319"]]},{"id":"c700b88cea604319","type":"ut-assert-success","z":"9942fa1aeb1b2428","g":"1b86e50802681fd8","name":"","count":1,"x":2558,"y":974,"wires":[]},{"id":"0cd730c8ce078dfa","type":"switch","z":"9942fa1aeb1b2428","g":"2a1e1e18b1bdc778","name":"check all tests","property":"payload","propertyType":"msg","rules":[{"t":"false"},{"t":"eq","v":"111","vt":"str"},{"t":"eq","v":"$match($$.payload, /./,-1)","vt":"jsonata"},{"t":"eq","v":"$match($$.payload, /([0-9]+)([a-z]+)([0-9]+)([a-z]+)/,0)","vt":"jsonata"}],"checkall":"true","repair":false,"outputs":4,"x":3103,"y":757.0000203450521,"wires":[["b7619d367f6362ac"],["25531b16d5ca4356"],["f43af69646ed8372"],["8f0fcbc0ddf91a18"]]},{"id":"5c0214cf09248149","type":"inject","z":"9942fa1aeb1b2428","g":"2a1e1e18b1bdc778","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"111","payloadType":"str","x":2814,"y":644.0000203450521,"wires":[["0cd730c8ce078dfa"]]},{"id":"b7619d367f6362ac","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"2a1e1e18b1bdc778","name":"","x":3416,"y":662.0000203450521,"wires":[]},{"id":"f43af69646ed8372","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"2a1e1e18b1bdc778","name":"","x":3416,"y":829.3333536783855,"wires":[]},{"id":"8f0fcbc0ddf91a18","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"2a1e1e18b1bdc778","name":"","x":3416,"y":883.0000203450521,"wires":[]},{"id":"e8931d22befdbdfb","type":"catch","z":"9942fa1aeb1b2428","g":"2a1e1e18b1bdc778","name":"","scope":["0cd730c8ce078dfa"],"uncaught":false,"x":2814,"y":979.0000203450521,"wires":[["d067e5695140c3f5"]]},{"id":"d067e5695140c3f5","type":"ut-assert-success","z":"9942fa1aeb1b2428","g":"2a1e1e18b1bdc778","name":"","count":1,"x":3416,"y":979.0000203450521,"wires":[]},{"id":"85e62996aecce136","type":"switch","z":"9942fa1aeb1b2428","g":"004ba979caee84d8","name":"stop after first match","property":"payload","propertyType":"msg","rules":[{"t":"false"},{"t":"eq","v":"111","vt":"str"},{"t":"eq","v":"$match($$.payload, /./,-1)","vt":"jsonata"},{"t":"eq","v":"$match($$.payload, /([0-9]+)([a-z]+)([0-9]+)([a-z]+)/,0)","vt":"jsonata"}],"checkall":"false","repair":false,"outputs":4,"x":3249.285888671875,"y":1930.71435546875,"wires":[["2abc796939081ff2"],["61837ad6a12064f4"],["35a13e7f0f9fad1d"],["b6c05e8822a98be7"]]},{"id":"64f7f0f05384dd8f","type":"inject","z":"9942fa1aeb1b2428","g":"004ba979caee84d8","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"111","payloadType":"str","x":2890.285888671875,"y":1817.71435546875,"wires":[["85e62996aecce136"]]},{"id":"2abc796939081ff2","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"004ba979caee84d8","name":"","x":3512.285888671875,"y":1835.71435546875,"wires":[]},{"id":"35a13e7f0f9fad1d","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"004ba979caee84d8","name":"","x":3512.285888671875,"y":1943.0476888020835,"wires":[]},{"id":"b6c05e8822a98be7","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"004ba979caee84d8","name":"","x":3512.285888671875,"y":1996.71435546875,"wires":[]},{"id":"0a48f56a9fc05666","type":"catch","z":"9942fa1aeb1b2428","g":"004ba979caee84d8","name":"","scope":["85e62996aecce136"],"uncaught":false,"x":3178.285888671875,"y":2092.71435546875,"wires":[["db7504914c7f096a"]]},{"id":"db7504914c7f096a","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"004ba979caee84d8","name":"","x":3512.285888671875,"y":2092.71435546875,"wires":[]},{"id":"61837ad6a12064f4","type":"ut-assert-success","z":"9942fa1aeb1b2428","g":"004ba979caee84d8","name":"","count":1,"x":3512.285888671875,"y":1889.3810221354167,"wires":[]},{"id":"1958d237b3d1f43f","type":"switch","z":"9942fa1aeb1b2428","g":"e4c37bace09b5a4b","name":"stop after first match","property":"payload","propertyType":"msg","rules":[{"t":"false"},{"t":"eq","v":"$match($$.payload, /./,-1)","vt":"jsonata"},{"t":"eq","v":"111","vt":"str"},{"t":"eq","v":"$match($$.payload, /([0-9]+)([a-z]+)([0-9]+)([a-z]+)/,0)","vt":"jsonata"}],"checkall":"false","repair":false,"outputs":4,"x":2343.285888671875,"y":1940.71435546875,"wires":[["e63fa7e2ca1762ea"],["7ddb97124682abbd"],["986a3a304382c511"],["4e05f68a4f62fc0a"]]},{"id":"fea71c0eb266ec97","type":"inject","z":"9942fa1aeb1b2428","g":"e4c37bace09b5a4b","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"111","payloadType":"str","x":2004.285888671875,"y":1821.71435546875,"wires":[["1958d237b3d1f43f"]]},{"id":"e63fa7e2ca1762ea","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"e4c37bace09b5a4b","name":"","x":2626.285888671875,"y":1839.71435546875,"wires":[]},{"id":"7ddb97124682abbd","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"e4c37bace09b5a4b","name":"","x":2626.285888671875,"y":1893.3810221354165,"wires":[]},{"id":"4e05f68a4f62fc0a","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"e4c37bace09b5a4b","name":"","x":2626.285888671875,"y":2000.71435546875,"wires":[]},{"id":"986a3a304382c511","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"e4c37bace09b5a4b","name":"","x":2626.285888671875,"y":1947.0476888020833,"wires":[]},{"id":"60b072c35d4771da","type":"catch","z":"9942fa1aeb1b2428","g":"e4c37bace09b5a4b","name":"","scope":["1958d237b3d1f43f"],"uncaught":false,"x":2292.285888671875,"y":2096.71435546875,"wires":[["8f3b143dd63ade9d"]]},{"id":"8f3b143dd63ade9d","type":"ut-assert-success","z":"9942fa1aeb1b2428","g":"e4c37bace09b5a4b","name":"","count":1,"x":2626.285888671875,"y":2096.71435546875,"wires":[]},{"id":"4e0a3736aee9a07c","type":"ut-assert-success","z":"9942fa1aeb1b2428","g":"6214c2a00e7550fc","name":"","count":1,"x":1701,"y":739,"wires":[]},{"id":"509e5a34a29f7ff3","type":"ut-assert-success","z":"9942fa1aeb1b2428","g":"987e86048f782eee","name":"","count":1,"x":1703.5,"y":1991.5,"wires":[]},{"id":"e7b6437b94874bf1","type":"ut-assert-success","z":"9942fa1aeb1b2428","g":"93a0c887ef8a3e70","name":"","count":1,"x":3418.4287109375,"y":235,"wires":[]},{"id":"25531b16d5ca4356","type":"ut-assert-success","z":"9942fa1aeb1b2428","g":"d215047493c59c5f","name":"","count":1,"x":3416,"y":749,"wires":[]},{"id":"5555564f777e5fdd","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"53300cc6a277013b","name":"","x":3418.4287109375,"y":318.76191965738934,"wires":[]},{"id":"aabab4db0bd44f2a","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"53300cc6a277013b","name":"","x":3418.4287109375,"y":372.428586324056,"wires":[]},{"id":"9cdf0af0c29dcbc2","type":"ut-assert-success","z":"9942fa1aeb1b2428","g":"53300cc6a277013b","name":"","count":1,"x":3418.4287109375,"y":468.428586324056,"wires":[]},{"id":"e608bd8005f3e593","type":"ut-assert-success","z":"9942fa1aeb1b2428","g":"76743090d2555fde","name":"","count":1,"x":2560.4287109375,"y":281,"wires":[]},{"id":"56169ac1105b2469","type":"ut-assert-success","z":"9942fa1aeb1b2428","g":"0121100f46b9a2f6","name":"","count":1,"x":2558,"y":796,"wires":[]},{"id":"388d526d8b5bc65f","type":"catch","z":"9942fa1aeb1b2428","g":"1f20f08de37f7131","name":"","scope":["2c867a9d03379f5a"],"uncaught":false,"x":208,"y":648,"wires":[["b74874da3cc77fe5"]]},{"id":"b74874da3cc77fe5","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"1f20f08de37f7131","name":"","x":522,"y":648,"wires":[]},{"id":"e5527783b9bcd9e1","type":"catch","z":"9942fa1aeb1b2428","g":"b31b246f6078a7fa","name":"","scope":["d312c33b49855c32"],"uncaught":false,"x":208,"y":1931.8571491241455,"wires":[["651ce4cd24a96813"]]},{"id":"651ce4cd24a96813","type":"ut-assert-failure","z":"9942fa1aeb1b2428","g":"b31b246f6078a7fa","name":"","x":522,"y":1931.8571491241455,"wires":[]}]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"disabled":false,"env":[{"name":"NODE_RED_DIVERGENT","type":"bool","value":"true"}],"id":"36846ad6698e1bc0","info":"","label":"[switch] post debug on JSONata exception","type":"tab"},{"h":354.5,"id":"68fc7da02e4ce9da","name":"catch captures exception","nodes":["83ab1354d90466f0","e9aa1d82d093db52","8d0e6a588bc579ce","915116870214bc0f","1466e3dcc32f09f6","5756ca28703729dc","5973bb0d4b1948b1","67fd7857fbebca0f"],"style":{"label":true},"type":"group","w":910,"x":8,"y":828,"z":"36846ad6698e1bc0"},{"h":383,"id":"0e4b83838b47f758","name":"no catch node to capture the exception","nodes":["9f0163ae195dc699","6dcf13bd6d4133a1","1a2dc9cdead129cb","4a51dd50369e9361","287121aac37d559b","4928acc9d0bc81a2"],"style":{"label":true},"type":"group","w":1030,"x":31,"y":362.5,"z":"36846ad6698e1bc0"},{"g":"68fc7da02e4ce9da","h":138,"id":"5973bb0d4b1948b1","name":"Node-RED diverge","nodes":["0dfefb756493e5d9","1bb2357cf149aeb0"],"style":{"color":"#9363b7","fill":"#bfdbef","label":true},"type":"group","w":192,"x":700,"y":1018.5,"z":"36846ad6698e1bc0"},{"g":"0e4b83838b47f758","h":144,"id":"287121aac37d559b","name":"Node-RED Diverge","nodes":["93eda421738039cf","6ff441e31fe3209a"],"style":{"color":"#9363b7","fill":"#bfdbef","label":true},"type":"group","w":192,"x":600,"y":512.5,"z":"36846ad6698e1bc0"},{"crontab":"","g":"0e4b83838b47f758","id":"9f0163ae195dc699","name":"","once":false,"onceDelay":0.1,"payload":"hello world","payloadType":"str","props":[{"p":"payload"}],"repeat":"","topic":"","type":"inject","wires":[["6dcf13bd6d4133a1"]],"x":137,"y":553.5,"z":"36846ad6698e1bc0"},{"checkall":"true","g":"0e4b83838b47f758","id":"6dcf13bd6d4133a1","name":"property uses broken jsonata","outputs":3,"property":"payload","propertyType":"msg","repair":false,"rules":[{"t":"eq","v":"$fromMillis()","vt":"jsonata"},{"t":"else"},{"t":"eq","v":"hello world","vt":"str"}],"type":"switch","wires":[["1a2dc9cdead129cb"],["93eda421738039cf"],["6ff441e31fe3209a"]],"x":415,"y":553.5,"z":"36846ad6698e1bc0"},{"g":"0e4b83838b47f758","id":"1a2dc9cdead129cb","name":"","type":"ut-assert-failure","wires":[],"x":696,"y":403.5,"z":"36846ad6698e1bc0"},{"g":"0e4b83838b47f758","id":"4a51dd50369e9361","inverse":false,"msgtype":"error","name":"","nodeid":"6dcf13bd6d4133a1","scope":["6dcf13bd6d4133a1"],"type":"ut-assert-debug","wires":[["4928acc9d0bc81a2"]],"x":387,"y":704.5,"z":"36846ad6698e1bc0"},{"count":1,"g":"287121aac37d559b","id":"93eda421738039cf","name":"","type":"ut-assert-success","wires":[],"x":696,"y":553.5,"z":"36846ad6698e1bc0"},{"count":1,"g":"287121aac37d559b","id":"6ff441e31fe3209a","name":"","type":"ut-assert-success","wires":[],"x":696,"y":615.5,"z":"36846ad6698e1bc0"},{"crontab":"","g":"68fc7da02e4ce9da","id":"83ab1354d90466f0","name":"","once":false,"onceDelay":0.1,"payload":"hello world","payloadType":"str","props":[{"p":"payload"}],"repeat":"","topic":"","type":"inject","wires":[["e9aa1d82d093db52"]],"x":114,"y":944,"z":"36846ad6698e1bc0"},{"checkall":"true","g":"68fc7da02e4ce9da","id":"e9aa1d82d093db52","name":"broken property jsonata","outputs":3,"property":"payload","propertyType":"msg","repair":false,"rules":[{"t":"eq","v":"$fromMillis()","vt":"jsonata"},{"t":"else"},{"t":"eq","v":"hello world","vt":"str"}],"type":"switch","wires":[["8d0e6a588bc579ce"],["0dfefb756493e5d9"],["1bb2357cf149aeb0"]],"x":393,"y":996,"z":"36846ad6698e1bc0"},{"g":"68fc7da02e4ce9da","id":"8d0e6a588bc579ce","name":"","type":"ut-assert-failure","wires":[],"x":792,"y":946.5,"z":"36846ad6698e1bc0"},{"g":"68fc7da02e4ce9da","id":"915116870214bc0f","inverse":true,"msgtype":"error","name":"","nodeid":"e9aa1d82d093db52","scope":["e9aa1d82d093db52"],"type":"ut-assert-debug","wires":[["67fd7857fbebca0f"]],"x":411,"y":1066.5,"z":"36846ad6698e1bc0"},{"count":1,"g":"5973bb0d4b1948b1","id":"0dfefb756493e5d9","name":"","type":"ut-assert-success","wires":[],"x":796,"y":1059.5,"z":"36846ad6698e1bc0"},{"count":1,"g":"5973bb0d4b1948b1","id":"1bb2357cf149aeb0","name":"","type":"ut-assert-success","wires":[],"x":796,"y":1115.5,"z":"36846ad6698e1bc0"},{"g":"68fc7da02e4ce9da","id":"1466e3dcc32f09f6","name":"","scope":["e9aa1d82d093db52"],"type":"catch","uncaught":false,"wires":[["5756ca28703729dc"]],"x":384,"y":926,"z":"36846ad6698e1bc0"},{"count":1,"g":"68fc7da02e4ce9da","id":"5756ca28703729dc","name":"","type":"ut-assert-success","wires":[],"x":793,"y":869,"z":"36846ad6698e1bc0"},{"g":"68fc7da02e4ce9da","id":"67fd7857fbebca0f","name":"","type":"ut-assert-failure","wires":[],"x":408,"y":1131,"z":"36846ad6698e1bc0"},{"g":"0e4b83838b47f758","id":"4928acc9d0bc81a2","ignore_failure_if_succeed":false,"name":"","rules":[{"p":"debug.nodeid","pt":"msg","t":"eql","to":"6dcf13bd6d4133a1","tot":"str"},{"p":"payload['level']","pt":"msg","t":"eql","to":"20","tot":"num"},{"p":"payload.msg.error_msg","pt":"msg","t":"eql","to":"jsonata unsupported function: {fromMillis,[]}","tot":"str"},{"p":"payload.name","pt":"msg","t":"eql","to":"property uses broken jsonata","tot":"str"}],"type":"ut-assert-values","wires":[[]],"x":955,"y":704,"z":"36846ad6698e1bc0"}]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"disabled":false,"env":[],"id":"b1501de32c769cf2","info":"This test case covers the error if the property to be compared is a JSONata stanza and it raises an exception.\n\nThen no message is set and an exception is raised.","label":"[switch] raise exception if JSONata has exception","type":"tab"},{"h":332.5,"id":"b179a3729bc7c881","name":"no catch node to capture exception, exception pushed to debug panel","nodes":["acd59574afa50c69","e1619782ce85c87e","8ad67238a56a315e","0302ea142e5c8cab","02f8693eb7c07248","68c4b79eb9859c82","6364919d0c880add"],"style":{"label":true},"type":"group","w":681,"x":101,"y":389.5,"z":"b1501de32c769cf2"},{"h":362.5,"id":"fcc18875b3ace1c8","name":"catch node captures exception from switch","nodes":["b5e3a374eeb4b567","960b15d20cb7a574","2a8bbbc24db0f002","d8fe98dc98f31235","84b7e5e5e4cde7a6","25419f6581880e81","b41fb23447ec3fec","191245390479750d","80c9498f2856beb8"],"style":{"label":true},"type":"group","w":710,"x":91,"y":787,"z":"b1501de32c769cf2"},{"crontab":"","g":"b179a3729bc7c881","id":"acd59574afa50c69","name":"","once":false,"onceDelay":0.1,"payload":"hello world","payloadType":"str","props":[{"p":"payload"}],"repeat":"","topic":"","type":"inject","wires":[["e1619782ce85c87e"]],"x":207,"y":524,"z":"b1501de32c769cf2"},{"checkall":"true","g":"b179a3729bc7c881","id":"e1619782ce85c87e","name":"","outputs":3,"property":"$fromMillis()","propertyType":"jsonata","repair":false,"rules":[{"t":"eq","v":"$fromMillis()","vt":"jsonata"},{"t":"else"},{"t":"eq","v":"hello world","vt":"str"}],"type":"switch","wires":[["8ad67238a56a315e"],["02f8693eb7c07248"],["0302ea142e5c8cab"]],"x":433,"y":524,"z":"b1501de32c769cf2"},{"g":"b179a3729bc7c881","id":"8ad67238a56a315e","name":"","type":"ut-assert-failure","wires":[],"x":666,"y":430.5,"z":"b1501de32c769cf2"},{"g":"b179a3729bc7c881","id":"0302ea142e5c8cab","name":"","type":"ut-assert-failure","wires":[],"x":666,"y":570.5,"z":"b1501de32c769cf2"},{"g":"b179a3729bc7c881","id":"02f8693eb7c07248","name":"","type":"ut-assert-failure","wires":[],"x":666,"y":500.5,"z":"b1501de32c769cf2"},{"g":"b179a3729bc7c881","id":"68c4b79eb9859c82","inverse":false,"msgtype":"error","name":"","nodeid":"e1619782ce85c87e","scope":["e1619782ce85c87e"],"type":"ut-assert-debug","wires":[["6364919d0c880add"]],"x":416,"y":681,"z":"b1501de32c769cf2"},{"crontab":"","g":"fcc18875b3ace1c8","id":"b5e3a374eeb4b567","name":"","once":false,"onceDelay":0.1,"payload":"hello world","payloadType":"str","props":[{"p":"payload"}],"repeat":"","topic":"","type":"inject","wires":[["960b15d20cb7a574"]],"x":197,"y":1007,"z":"b1501de32c769cf2"},{"checkall":"true","g":"fcc18875b3ace1c8","id":"960b15d20cb7a574","name":"","outputs":3,"property":"$fromMillis()","propertyType":"jsonata","repair":false,"rules":[{"t":"eq","v":"$fromMillis()","vt":"jsonata"},{"t":"else"},{"t":"eq","v":"hello world","vt":"str"}],"type":"switch","wires":[["2a8bbbc24db0f002"],["84b7e5e5e4cde7a6"],["d8fe98dc98f31235"]],"x":435,"y":1006,"z":"b1501de32c769cf2"},{"g":"fcc18875b3ace1c8","id":"2a8bbbc24db0f002","name":"","type":"ut-assert-failure","wires":[],"x":705,"y":904.1666666666666,"z":"b1501de32c769cf2"},{"g":"fcc18875b3ace1c8","id":"d8fe98dc98f31235","name":"","type":"ut-assert-failure","wires":[],"x":705,"y":1056.5,"z":"b1501de32c769cf2"},{"g":"fcc18875b3ace1c8","id":"84b7e5e5e4cde7a6","name":"","type":"ut-assert-failure","wires":[],"x":705,"y":980.3333333333333,"z":"b1501de32c769cf2"},{"g":"fcc18875b3ace1c8","id":"25419f6581880e81","inverse":true,"msgtype":"error","name":"","nodeid":"960b15d20cb7a574","scope":["960b15d20cb7a574"],"type":"ut-assert-debug","wires":[["80c9498f2856beb8"]],"x":433,"y":1108.5,"z":"b1501de32c769cf2"},{"g":"fcc18875b3ace1c8","id":"b41fb23447ec3fec","name":"","scope":["960b15d20cb7a574"],"type":"catch","uncaught":false,"wires":[["191245390479750d"]],"x":391,"y":925,"z":"b1501de32c769cf2"},{"count":1,"g":"fcc18875b3ace1c8","id":"191245390479750d","name":"","type":"ut-assert-success","wires":[],"x":705,"y":828,"z":"b1501de32c769cf2"},{"g":"fcc18875b3ace1c8","id":"80c9498f2856beb8","name":"","type":"ut-assert-failure","wires":[],"x":705,"y":1108.5,"z":"b1501de32c769cf2"},{"g":"b179a3729bc7c881","id":"6364919d0c880add","ignore_failure_if_succeed":false,"name":"","rules":[{"p":"debug.nodeid","pt":"msg","t":"eql","to":"e1619782ce85c87e","tot":"str"},{"p":"debug.type","pt":"msg","t":"eql","to":"error","tot":"str"},{"p":"payload['level']","pt":"msg","t":"eql","to":"20","tot":"num"},{"p":"payload.msg.error_msg","pt":"msg","t":"eql","to":"jsonata unsupported function: {fromMillis,[]}","tot":"str"}],"type":"ut-assert-values","wires":[[]],"x":676,"y":681,"z":"b1501de32c769cf2"}]
|