{"nodes":{"eyrmry3w4v0obbxqdxv0ogdpkmvokp7x":{"type":"start","x":0,"y":0,"properties":{"title":"5 Understanding control edges","excerpt":"","author":"GraVersal","license":"CC BY 4.0","channel":"builder","category":"Tutorial - Basics"}},"o6dxxjjs3g1yqitl9r6auheux8stgnim":{"type":"message","x":-551.999200501962,"y":4.110070306770432,"properties":{"text":"Sometimes you want to __change states__ in nodes without triggering them directly.","repeatOnReentry":true}},"9mcpa09zxwwq8zbyhmnj24wes7r11dgh":{"type":"message","x":-832.7895747529981,"y":822.0958313497737,"properties":{"text":"There are two additional edges for this:\n\n* Push-Edges\n* Call-Edges","repeatOnReentry":true}},"kyhmuv9zjujrv35hxjvuv0y24t2dp6rh":{"type":"question","x":-824.6031381337633,"y":1429.967443152173,"properties":{"text":"Which type would you like to learn more about?","repeatOnReentry":true,"reviewable":true}},"04qiada5ng10uyda5ppfox4bs658pd2s":{"type":"suggestion","x":-1068.6181381337633,"y":1419.4434431521731,"properties":{"value":"","label":"Push-Edges"}},"hp517j2fkdaxp0e34pedqveegzed0k06":{"type":"suggestion","x":-550.2782424700387,"y":1424.9313540622672,"properties":{"value":"","label":"Call-Edges"}},"t289arht9j5r8qjs4tw8uahk7lm9cfe3":{"type":"message","x":-1863.9924808540416,"y":1417.3981736901178,"properties":{"text":"In GraVersal, **states aren't global**. If you want to send a value from one node to another, you normally do this using MAY and MUST edges. There's also PUSH. PUSH means you simply **send the information without physically going to the node and activating it**.","repeatOnReentry":true}},"r3uh0o8kx2668sry3qhdnlxopr0o53t5":{"type":"message","x":-2152.1822139064298,"y":1534.1518400512762,"properties":{"text":"First, I define a template in a sub-branch and pass it over to the other node without visiting it directly.","repeatOnReentry":true}},"ol1csge0h06373fnpwbevxy8wpwfq5hu":{"type":"message","x":-818.1349277913016,"y":143.1200356826314,"properties":{"text":"In other words: You want to influence __remote nodes__ without going there directly.","repeatOnReentry":true}},"724227q10qblooms0fb407dz6pgvropq":{"type":"message","x":-2070.7068243550557,"y":2335.664221427915,"properties":{"text":"Look at this message. I just passed the template over. **Its contents are: \"{{foo}}\".**\n\nThe wide edge means: go along that side first and pass the information over. Only then visit the node via the thinner edge.","repeatOnReentry":true}},"upax5lr31lablwvjvy0bq161zosnzr5f":{"type":"message","x":-2266.5719644926457,"y":2096.4838866438863,"properties":{"text":"Sending states to other nodes with PUSH edges is like **throwing a stone** with a piece of paper over without actually going there. Later, when I encounter the node, I'll find this information.","repeatOnReentry":true}},"9xk9heqxxu8581jidwuo2x2frvy3iqm4":{"type":"conclusion","x":-1498.9270803743873,"y":2029.2798087951269,"properties":{"text":""}},"m9fzcud4lem01n4qoahqyisz8hd6ubq5":{"type":"message","x":102.6566264018155,"y":2021.7555565232929,"properties":{"text":"In GraVersal you can also start actions on remote nodes without visiting them directly.","repeatOnReentry":true}},"bg0q77d7u8wb64wipvw6kh4etnhdqgq1":{"type":"message","x":401.78058436125707,"y":2191.9130150309215,"properties":{"text":"Why is this important? Because you can't directly activate a node this way, but you can influence past or future states.","repeatOnReentry":true}},"na3d1g5bil8evawlh0dcqx2of7dw9u8f":{"type":"message","x":630.8365843612571,"y":2372.665015030922,"properties":{"text":"It's like throwing a stone that hits a lever. The node can then already do something and change its state before you even reach it.","repeatOnReentry":true}},"c2e514yz63psahkl2x3xvdom17v0asua":{"type":"question","x":-2295.2939607002127,"y":1726.125105074493,"properties":{"text":"Ready to start?","repeatOnReentry":true,"reviewable":true}},"kdmo53g8vpebg727ltlsqaizjx1r986f":{"type":"suggestion","x":-2304.535815409408,"y":1900.8338047812663,"properties":{"value":"","label":"yes"}},"3wkbzncrfmq9i5t1yu0bajrbsi6w3wcd":{"type":"message","x":704.661584361257,"y":2608.682015030922,"properties":{"text":"For example, think of switches that you want to turn on or off or API nodes that you want to warm up.","repeatOnReentry":true}},"imrzsqkvo61vvxwdpnsm01cvlmhw0oye":{"type":"question","x":695.1315843612571,"y":2775.842015030922,"properties":{"text":"I'm now warming up an API node in a branch, which you won't visit until a timer expires. Ready?","repeatOnReentry":true,"reviewable":true}},"m1psyijd7hcrd71kxhxzu7z4cflwia2o":{"type":"suggestion","x":670.2305843612571,"y":2955.6100150309217,"properties":{"value":"","label":"Yes"}},"foq2r50a53fd7uf577s15p25ucnl6f3v":{"type":"conclusion","x":652.6635843612571,"y":3134.807015030922,"properties":{"text":""}},"0pnl3rlfkjhdr0akqci6542mghibwevv":{"type":"conclusion","x":187.6235843612571,"y":3298.169015030922,"properties":{"text":""}},"3ftmpwtpiug4g549kyr0epw5hdlev1j9":{"type":"fetch","x":401.0055843612571,"y":3635.026015030922,"properties":{"url":"https://api.ipify.org?format=json","data":"{}","method":"GET","repeatOnReentry":true}},"wfnlgabyfqplp8aszstrhyabdgpsss8m":{"type":"timer","x":658.234584361257,"y":3340.748015030922,"properties":{"seconds":"5","repeatOnReentry":true}},"q48mt5s1z9ein7rwb30ectx1yayw980b":{"type":"conclusion","x":546.2945843612571,"y":3492.641015030922,"properties":{"text":"Timer elapsed"}},"uwxebzjuck1z4czezfve4gk7zi6rftyj":{"type":"message","x":335.1685843612571,"y":3877.5700150309217,"properties":{"text":"The API was already warmed up before I visited it. Your IP is {{result.ip}}","repeatOnReentry":true}},"8qyztgcj7vd6mbir3obnue2zg6x9v1m2":{"type":"message","x":172.60958436125708,"y":4082.761015030922,"properties":{"text":"By the way, you can also use call edges like the next one to reset nodes you've already been on. This way, you can remove entire branches from the context and restart them.","repeatOnReentry":true}},"oex62hco0vcaash3846zu6rkpeirs7h2":{"type":"conclusion","x":-338.46359993998396,"y":3929.776665742997,"properties":{"text":""}},"6s6zuz9bu3lnfowum9kpdeswd5d6pngf":{"type":"text","x":-2538.908963601248,"y":2339.2160387758136,"properties":{"expression":"bar","rerenderOnReentry":true,"rerenderOnChance":true}},"lar0ajn51f2ij77bbmkajik4hd6ehhlv":{"type":"message","x":-836.9950467191111,"y":523.2644231085745,"properties":{"text":"In the words of a GraVersal: It's like __throwing a stone__ across to the other intersection, pressing a lever there, and leaving information for later.","repeatOnReentry":true,"repeatOnChance":true}},"ef0rovxeowvj8sbuioxbfc8p28d12m8n":{"type":"jump","x":460.8661788944478,"y":11.65206237476687,"properties":{"label":"Back to tutorial start","flow":"https://platform.graversal.io/api/flows/xnggg7ykv5sppva649cd73r6zh2zfedg"}},"85wb8u3ki00n66f3pevwe411i7wcao75":{"type":"message","x":-1754.2138841182589,"y":2194.229482246323,"properties":{"text":"One last information: PUSH edges can **only pass information forward** and never reflect it back.","repeatOnReentry":true,"repeatOnChance":true}}},"edges":{"8j928xs66g7fy5qix5c8a8se583g78uj":{"type":"may","from":"eyrmry3w4v0obbxqdxv0ogdpkmvokp7x","to":"o6dxxjjs3g1yqitl9r6auheux8stgnim","properties":{"priority":5}},"mfdo5lh8uq0rjbrsfq0krybcrd6ajoi6":{"type":"may","from":"9mcpa09zxwwq8zbyhmnj24wes7r11dgh","to":"kyhmuv9zjujrv35hxjvuv0y24t2dp6rh","properties":{"priority":4,"condition":"arrived"}},"ldhhkpy6k4n8fv1iwr0w0t7bcsgxl2nr":{"type":"may","from":"kyhmuv9zjujrv35hxjvuv0y24t2dp6rh","to":"04qiada5ng10uyda5ppfox4bs658pd2s","properties":{"priority":5,"condition":""}},"p7e065uhk0cm7iuiu56s7x6e6ofdja1a":{"type":"may","from":"kyhmuv9zjujrv35hxjvuv0y24t2dp6rh","to":"hp517j2fkdaxp0e34pedqveegzed0k06","properties":{"priority":4,"condition":""}},"3aueknnptqbe5zfq0vs32vaafzzijfn1":{"type":"may","from":"04qiada5ng10uyda5ppfox4bs658pd2s","to":"t289arht9j5r8qjs4tw8uahk7lm9cfe3","properties":{"priority":4,"condition":"selected"}},"if2tn4ohvdb302sbbo818sq3rdd2214e":{"type":"may","from":"t289arht9j5r8qjs4tw8uahk7lm9cfe3","to":"r3uh0o8kx2668sry3qhdnlxopr0o53t5","properties":{"priority":4,"condition":"arrived"}},"h5afgqbpxm56o1lg25mqp803tsmefdhk":{"type":"may","from":"o6dxxjjs3g1yqitl9r6auheux8stgnim","to":"ol1csge0h06373fnpwbevxy8wpwfq5hu","properties":{"priority":4,"condition":"arrived"}},"1msn12rni4n5ykno6vajqpxt61lyzuag":{"type":"call","from":"9xk9heqxxu8581jidwuo2x2frvy3iqm4","to":"kyhmuv9zjujrv35hxjvuv0y24t2dp6rh","properties":{"priority":4,"method":"reset"}},"id8wfvcesmpenyiwerfjzca0w021h5r1":{"type":"may","from":"hp517j2fkdaxp0e34pedqveegzed0k06","to":"m9fzcud4lem01n4qoahqyisz8hd6ubq5","properties":{"priority":4,"condition":"selected"}},"7weye4ub7tdlgd0563dys0jtxiel2tuq":{"type":"may","from":"m9fzcud4lem01n4qoahqyisz8hd6ubq5","to":"bg0q77d7u8wb64wipvw6kh4etnhdqgq1","properties":{"priority":4,"condition":"arrived"}},"pj3waidoe7e7j98iyyha49u2j9wz7a38":{"type":"may","from":"bg0q77d7u8wb64wipvw6kh4etnhdqgq1","to":"na3d1g5bil8evawlh0dcqx2of7dw9u8f","properties":{"priority":4,"condition":"arrived"}},"imxo69glv7xocejn8mpiybs7vntxr7ov":{"type":"may","from":"r3uh0o8kx2668sry3qhdnlxopr0o53t5","to":"c2e514yz63psahkl2x3xvdom17v0asua","properties":{"priority":4,"condition":"arrived"}},"5m61h5xco3k2taqxg7rbjkxcxgh97rkq":{"type":"may","from":"c2e514yz63psahkl2x3xvdom17v0asua","to":"kdmo53g8vpebg727ltlsqaizjx1r986f","properties":{"priority":4,"condition":""}},"zmwe9fc8v2czug9y9x50i2ncbsvqle0y":{"type":"may","from":"kdmo53g8vpebg727ltlsqaizjx1r986f","to":"upax5lr31lablwvjvy0bq161zosnzr5f","properties":{"priority":4,"condition":"selected"}},"nlnvv7x2h5pgsnyqsmugpkclluk8j2qu":{"type":"may","from":"upax5lr31lablwvjvy0bq161zosnzr5f","to":"724227q10qblooms0fb407dz6pgvropq","properties":{"priority":4,"condition":"arrived"}},"xos0fht9a2eits94qe5vqaptuddsbbmq":{"type":"may","from":"na3d1g5bil8evawlh0dcqx2of7dw9u8f","to":"3wkbzncrfmq9i5t1yu0bajrbsi6w3wcd","properties":{"priority":4,"condition":"arrived"}},"2d8r1vgtzjqjnu4wkn3l5x185cib0y4z":{"type":"may","from":"3wkbzncrfmq9i5t1yu0bajrbsi6w3wcd","to":"imrzsqkvo61vvxwdpnsm01cvlmhw0oye","properties":{"priority":4,"condition":"sent"}},"l5vp9cef5cxl59xdw7puhyz7c6dktasa":{"type":"may","from":"imrzsqkvo61vvxwdpnsm01cvlmhw0oye","to":"m1psyijd7hcrd71kxhxzu7z4cflwia2o","properties":{"priority":4,"condition":""}},"tclwzocsszzn7dc23zqtvk8xtigjwwhy":{"type":"may","from":"m1psyijd7hcrd71kxhxzu7z4cflwia2o","to":"foq2r50a53fd7uf577s15p25ucnl6f3v","properties":{"priority":4,"condition":"selected"}},"pefhcfyaslj3x1h9kki5kdefysxc9ri3":{"type":"may","from":"foq2r50a53fd7uf577s15p25ucnl6f3v","to":"0pnl3rlfkjhdr0akqci6542mghibwevv","properties":{"priority":7}},"52rfwive2ucaxgu98xyos0abyt79a3vx":{"type":"call","from":"0pnl3rlfkjhdr0akqci6542mghibwevv","to":"3ftmpwtpiug4g549kyr0epw5hdlev1j9","properties":{"priority":4,"method":"send"}},"d2fh9fojf2cmlr3wfa935kaxyd513bun":{"type":"may","from":"foq2r50a53fd7uf577s15p25ucnl6f3v","to":"wfnlgabyfqplp8aszstrhyabdgpsss8m","properties":{"priority":4}},"hc5urqafplvb1papcqavxml0ez2xb6bf":{"type":"may","from":"wfnlgabyfqplp8aszstrhyabdgpsss8m","to":"q48mt5s1z9ein7rwb30ectx1yayw980b","properties":{"priority":4,"condition":"elapsed"}},"ddnj06pk6e9425ehtmkth4zz1h05xxh8":{"type":"may","from":"q48mt5s1z9ein7rwb30ectx1yayw980b","to":"3ftmpwtpiug4g549kyr0epw5hdlev1j9","properties":{"priority":4}},"upg3ab7zmac5wz46h06btvotx29ietmn":{"type":"may","from":"3ftmpwtpiug4g549kyr0epw5hdlev1j9","to":"uwxebzjuck1z4czezfve4gk7zi6rftyj","properties":{"priority":4,"condition":"done","push":"result"}},"mpj9nartbz8iyec6py75keuehti2oi8k":{"type":"may","from":"uwxebzjuck1z4czezfve4gk7zi6rftyj","to":"8qyztgcj7vd6mbir3obnue2zg6x9v1m2","properties":{"priority":4,"condition":"arrived"}},"pwyx5rv4bwlmetpj22fy77qd5xyghded":{"type":"may","from":"8qyztgcj7vd6mbir3obnue2zg6x9v1m2","to":"oex62hco0vcaash3846zu6rkpeirs7h2","properties":{"priority":4,"condition":"arrived"}},"sa3q9oqssczh4iy6kbk3jgyq6enljrte":{"type":"call","from":"oex62hco0vcaash3846zu6rkpeirs7h2","to":"kyhmuv9zjujrv35hxjvuv0y24t2dp6rh","properties":{"priority":4,"method":"reset"}},"spjif5dcxnntpg4vkp4ao8gfbvrblkvn":{"type":"may","from":"ol1csge0h06373fnpwbevxy8wpwfq5hu","to":"lar0ajn51f2ij77bbmkajik4hd6ehhlv","properties":{"priority":4,"condition":"arrived"}},"r2sbcp2dvhy14e14gmou5appz37o5c1h":{"type":"may","from":"lar0ajn51f2ij77bbmkajik4hd6ehhlv","to":"9mcpa09zxwwq8zbyhmnj24wes7r11dgh","properties":{"priority":4,"condition":"arrived"}},"ma4hkudi80ja7m8ld12eow6y9lktva08":{"type":"push","from":"6s6zuz9bu3lnfowum9kpdeswd5d6pngf","to":"724227q10qblooms0fb407dz6pgvropq","properties":{"priority":4,"push":"value","as":"foo"}},"qnpdn04cl0ogpryins3hzwlqz260jjnr":{"type":"may","from":"eyrmry3w4v0obbxqdxv0ogdpkmvokp7x","to":"ef0rovxeowvj8sbuioxbfc8p28d12m8n","properties":{"priority":4}},"7ap3370zfoynxxwc7m8j0kvpio7ngco4":{"type":"may","from":"724227q10qblooms0fb407dz6pgvropq","to":"85wb8u3ki00n66f3pevwe411i7wcao75","properties":{"priority":4,"condition":"arrived"}},"sakgfygfz6osqgbtwpckkt2t1wujwngk":{"type":"may","from":"85wb8u3ki00n66f3pevwe411i7wcao75","to":"9xk9heqxxu8581jidwuo2x2frvy3iqm4","properties":{"priority":4,"condition":"arrived"}},"c62e32gok8ewwaukshluph6z7wm1fopy":{"type":"may","from":"upax5lr31lablwvjvy0bq161zosnzr5f","to":"6s6zuz9bu3lnfowum9kpdeswd5d6pngf","properties":{"priority":7,"condition":"arrived"}}}}