I have created now two differnet flows.
This is a very simple flow to understand how the context variable works.
[{"id":"3331f309.b0c294","type":"inject","z":"26c470dc.f99018","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"30","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"10:46:23","payloadType":"str","x":200,"y":540,"wires":[["b6666d13.02dc18"]]},{"id":"b6666d13.02dc18","type":"function","z":"26c470dc.f99018","name":"","func":"flow.set (\"time\",msg.payload);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":390,"y":540,"wires":[[]]},{"id":"5e454f58.f966e8","type":"inject","z":"26c470dc.f99018","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"2","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":290,"y":660,"wires":[["7111d870.5ce068"]]},{"id":"7111d870.5ce068","type":"function","z":"26c470dc.f99018","name":"","func":"var time = flow.get(\"time\");\nmsg.payload = time; \nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":460,"y":660,"wires":[["866f336e.370de"]]},{"id":"866f336e.370de","type":"debug","z":"26c470dc.f99018","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":770,"y":640,"wires":[]}]
The second is to created the wished function.
[{"id":"7c1cd3fb.993404","type":"inject","z":"26c470dc.f99018","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":880,"wires":[["3ceda765.0341d"]]},{"id":"3ceda765.0341d","type":"counter","z":"26c470dc.f99018","name":"","init":"0","step":"1","lower":"","upper":"","mode":"increment","outputs":"1","x":330,"y":880,"wires":[["8e3706a6.fca648"]]},{"id":"8e3706a6.fca648","type":"function","z":"26c470dc.f99018","name":"","func":"var count = msg.count; \n\nif (msg.topic ==\"1\") {\n flow.set(\"today\",count); \n}\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":640,"y":880,"wires":[[]]},{"id":"c389515b.cf4ea","type":"change","z":"26c470dc.f99018","name":"","rules":[{"t":"move","p":"twoDaysbefore","pt":"flow","to":"previousDay","tot":"flow"},{"t":"move","p":"previousDay","pt":"flow","to":"today","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":980,"wires":[[]]},{"id":"f02fbc09.f83a88","type":"inject","z":"26c470dc.f99018","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"30","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"","payloadType":"date","x":170,"y":960,"wires":[["c389515b.cf4ea","8e3706a6.fca648","6de68fd.7729c7"]]},{"id":"7d852e78.6af2a8","type":"inject","z":"26c470dc.f99018","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":1080,"wires":[["eea86d53.33b75"]]},{"id":"eea86d53.33b75","type":"function","z":"26c470dc.f99018","name":"","func":"msg.today = flow.get(\"today\");\nmsg.previousDay = flow.get(\"previousDay\");\nmsg.twoDaysbefore = flow.get(\"twoDaysbefore\");\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":360,"y":1080,"wires":[["92f4b266.7b7688"]]},{"id":"92f4b266.7b7688","type":"debug","z":"26c470dc.f99018","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":550,"y":1080,"wires":[]},{"id":"6de68fd.7729c7","type":"debug","z":"26c470dc.f99018","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":610,"y":820,"wires":[]}]
I don´t understand why the context variables in the second flow will not be stored and shown in context?