Context value in a second flow
This flow is simply to demonstrate how to use a context value as a gate.
It uses a value saved to context in the first flow as the control condition of a switch in the second flow.
[{"id":"379bb2ac740b2b34","type":"inject","z":"c209837d3f5a8d4c","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":150,"y":60,"wires":[["c4f80d0682f703d3"]]},{"id":"8138bc2742f15fc3","type":"inject","z":"c209837d3f5a8d4c","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":150,"y":120,"wires":[["c4f80d0682f703d3"]]},{"id":"c4f80d0682f703d3","type":"change","z":"c209837d3f5a8d4c","name":"","rules":[{"t":"set","p":"gateopen","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":80,"wires":[["a07ce4a89192b42e"]]},{"id":"6377d2729b6cba39","type":"inject","z":"c209837d3f5a8d4c","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"If you are reading this context variable global.gateopen is true","payloadType":"str","x":130,"y":200,"wires":[["86d254e2e854796d"]]},{"id":"86d254e2e854796d","type":"switch","z":"c209837d3f5a8d4c","name":"if global.gateopen is true","property":"gateopen","propertyType":"global","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":350,"y":200,"wires":[["e9622412b7606bcc"]]},{"id":"e9622412b7606bcc","type":"debug","z":"c209837d3f5a8d4c","name":"Switch debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":620,"y":200,"wires":[]},{"id":"a07ce4a89192b42e","type":"debug","z":"c209837d3f5a8d4c","name":"Set debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":590,"y":80,"wires":[]}]