{"nodes":{"z1la21glzroj69anfoab0kyitw22ihcq":{"type":"start","x":0,"y":0,"properties":{"title":"State Merging","excerpt":"This example demonstrates the advantages of state merging over crossing edges.","post":"","author":"GraVersal","license":"CC BY 4.0","channel":"chat","category":"Patterns","private":false}},"7j1ighog9ci08q2lhs4t7x3gjazslm10":{"type":"message","x":351.0872932885495,"y":33.41870640137003,"properties":{"text":"This example demonstrates the advantages of __state merging__ over crossing edges.","repeatOnReentry":true}},"jce7ukjn9g18l3yrieis8inqif7kriqq":{"type":"question","x":-24.491648440497617,"y":477.6876665646893,"properties":{"text":"Which example would you like to see?","reviewable":true,"repeatOnReentry":true}},"ve5vmjzko24wxo6fldhspu59gybsbhmx":{"type":"suggestion","x":-238.06726648948165,"y":594.9372883764091,"properties":{"value":"","label":"crossing edges (chaotic)"}},"lokezlicdo3bqspjcjcj3t8dtrzkftpi":{"type":"suggestion","x":117.50556304496251,"y":579.9215507487648,"properties":{"value":"","label":"state merging (clean)"}},"e9a5fx69ld7l0f8s3viokulwfp7l4xe8":{"type":"question","x":-870.2728797434909,"y":1260.204924838746,"properties":{"text":"This is a question","reviewable":true,"repeatOnReentry":true}},"2320g6ljeeuo4m3ixpmtjwwlopvlu8er":{"type":"suggestion","x":-995.2021977634191,"y":1458.8965523121285,"properties":{"value":"","label":"a"}},"mwoimz8djtiji3vcpmoq50oanb3dyw4s":{"type":"suggestion","x":-755.4256703132401,"y":1483.3229538804892,"properties":{"value":"","label":"b"}},"rrqtejecgqa829znyya4ey5894vmimde":{"type":"prompt","x":-331.57240791329417,"y":1197.0160474409108,"properties":{"placeholder":"Type your message"}},"pmru576rv51ia2m7s8z7xo1z6okd2ujb":{"type":"message","x":-1140.302011604164,"y":1722.326700918347,"properties":{"text":"A","repeatOnReentry":true}},"dxx6v0zuiv2nsu5g2irldvc29w8mu9lo":{"type":"message","x":-896.5160454042956,"y":1732.0829261400597,"properties":{"text":"B","repeatOnReentry":true}},"094etta0y43yynzhv1oiz8jwe3usqvth":{"type":"message","x":414.4011922804806,"y":214.20729193053867,"properties":{"text":"Whenever possible use merging since it keeps the flow clean and avoids crossovers.","repeatOnReentry":true}},"lrpxqr3a3m3agrfa7t3k4hh90smk7qyk":{"type":"prompt","x":687.399116471605,"y":1118.16258144413,"properties":{"placeholder":"Type your message"}},"fmdsuwz8grbmqfcl8dygll9jal3o7cb0":{"type":"question","x":396.8613207880642,"y":1164.6976986353593,"properties":{"text":"This is a question","reviewable":true,"repeatOnReentry":true}},"70vbli98ij6liuuh6cnu2o9pfdq1p8ak":{"type":"suggestion","x":553.5791462329726,"y":1328.984865011379,"properties":{"value":"value == 'b'","label":"b"}},"kc74961o02qnvnwmg6u71blmkcy3lxrl":{"type":"suggestion","x":254.396374782015,"y":1321.9168609218432,"properties":{"value":"","label":"a"}},"3oslxzbcaz7ag7v0fojby93nvmymyqrl":{"type":"conclusion","x":-582.1068619460992,"y":1320.50183362398,"properties":{"text":"enable A"}},"h5bbkb2lfmnuixik30takz47b958ptud":{"type":"conclusion","x":-442.4471363100208,"y":1471.0338045822366,"properties":{"text":"enable B"}},"4dbsvlojkut1lhfqs3iz2yw3rh55dmil":{"type":"message","x":248.23582063574833,"y":1578.2466525158482,"properties":{"text":"A","repeatOnReentry":true}},"addl6fzv6grtpdiwjkh25pyf0mrse5ah":{"type":"message","x":588.8557834149333,"y":1595.0423480859276,"properties":{"text":"B","repeatOnReentry":true}},"zfm343hedwh7dxrkqhqgztxqlhvt34tr":{"type":"message","x":273.3485329789633,"y":752.0890751612542,"properties":{"text":"During merging, we pass the state to a neighboring node, which then checks the conditions itself. This leads to cleaner flows.\n","repeatOnReentry":true}},"uhepm2ymwmpqe7ohbcg6r1g6vr1yj3w9":{"type":"message","x":-372.049470228916,"y":768.0114395117512,"properties":{"text":"During crossings, we don't pass the state directly but check it separately at outgoing edges. This sometimes leads to seemingly chaotic overlaps of edges.","repeatOnReentry":true}},"32um9oqsxh65y0qonr5oc5cenizw1nlc":{"type":"message","x":273.0404264011664,"y":393.5639661110076,"properties":{"text":"Both examples produce the same output. However, one of them looks clearer.","repeatOnReentry":true}},"uvr5q9hsdrqkg97uci8jp0luanc9ob18":{"type":"message","x":457.47963748659254,"y":906.6341954177633,"properties":{"text":"Type A or B in the prompt to activate the corresponding button.","repeatOnReentry":true}},"5ox9ihyrsh27d9roh3xhar5p4j2u1w4o":{"type":"message","x":-504.35041681199,"y":942.9003169680822,"properties":{"text":"Type A or B in the prompt to activate the corresponding button.","repeatOnReentry":true}}},"edges":{"683sdzinihj9cuf87qidn4kqdgyud2gr":{"type":"may","from":"z1la21glzroj69anfoab0kyitw22ihcq","to":"7j1ighog9ci08q2lhs4t7x3gjazslm10","properties":{"priority":4}},"7w1n47ocmt28ubvctzrh3z35phlyt4e0":{"type":"may","from":"jce7ukjn9g18l3yrieis8inqif7kriqq","to":"ve5vmjzko24wxo6fldhspu59gybsbhmx","properties":{"priority":5,"condition":""}},"ki9u5pkf1scjyumlu2fshheigybp34dj":{"type":"may","from":"jce7ukjn9g18l3yrieis8inqif7kriqq","to":"lokezlicdo3bqspjcjcj3t8dtrzkftpi","properties":{"priority":4,"condition":""}},"wiafrs9u5rl8ominruuj23mykhwibpul":{"type":"may","from":"e9a5fx69ld7l0f8s3viokulwfp7l4xe8","to":"2320g6ljeeuo4m3ixpmtjwwlopvlu8er","properties":{"priority":4,"condition":""}},"8vd4qhmllsr54ifm915xuspehhll6k8e":{"type":"may","from":"e9a5fx69ld7l0f8s3viokulwfp7l4xe8","to":"mwoimz8djtiji3vcpmoq50oanb3dyw4s","properties":{"priority":4,"condition":""}},"ym2xh5igzu3t5fjhoq00za81gg66ss7i":{"type":"may","from":"2320g6ljeeuo4m3ixpmtjwwlopvlu8er","to":"pmru576rv51ia2m7s8z7xo1z6okd2ujb","properties":{"priority":4,"condition":"selected"}},"xzr57nilrvcv4wlq4u3hb8u4dv3jyhy9":{"type":"may","from":"mwoimz8djtiji3vcpmoq50oanb3dyw4s","to":"dxx6v0zuiv2nsu5g2irldvc29w8mu9lo","properties":{"priority":4,"condition":"selected"}},"9edw8u2xx49u9atbp4pfliy5f7x3jusu":{"type":"may","from":"7j1ighog9ci08q2lhs4t7x3gjazslm10","to":"094etta0y43yynzhv1oiz8jwe3usqvth","properties":{"priority":4,"condition":"arrived"}},"2yq8of5m44v6sc4eza5xvokq1zvpmwuh":{"type":"may","from":"fmdsuwz8grbmqfcl8dygll9jal3o7cb0","to":"70vbli98ij6liuuh6cnu2o9pfdq1p8ak","properties":{"priority":4,"condition":"value == 'B'"}},"y25dfgm4f4t78f1madrvc08ktdxblrk2":{"type":"may","from":"fmdsuwz8grbmqfcl8dygll9jal3o7cb0","to":"kc74961o02qnvnwmg6u71blmkcy3lxrl","properties":{"priority":4,"condition":"value == 'A'"}},"gak1m34nbde59jbagpzzt786xclwsmga":{"type":"push","from":"lrpxqr3a3m3agrfa7t3k4hh90smk7qyk","to":"fmdsuwz8grbmqfcl8dygll9jal3o7cb0","properties":{"priority":4,"condition":"sent","push":"value"}},"h4lz0uf28p415ar075eepzhrpn39jer2":{"type":"may","from":"rrqtejecgqa829znyya4ey5894vmimde","to":"3oslxzbcaz7ag7v0fojby93nvmymyqrl","properties":{"priority":4,"condition":"sent and value == 'A'"}},"nvef31x4doonkg9cmza7niwmx8mhw6rz":{"type":"may","from":"rrqtejecgqa829znyya4ey5894vmimde","to":"h5bbkb2lfmnuixik30takz47b958ptud","properties":{"priority":4,"condition":"sent and value == 'B'"}},"6srhi4qtnaysjtjxxn8pbi1653fds4wx":{"type":"must","from":"3oslxzbcaz7ag7v0fojby93nvmymyqrl","to":"2320g6ljeeuo4m3ixpmtjwwlopvlu8er","properties":{"priority":4}},"zjqj4jd50514m6tpleo3kyptq104ovtz":{"type":"must","from":"h5bbkb2lfmnuixik30takz47b958ptud","to":"mwoimz8djtiji3vcpmoq50oanb3dyw4s","properties":{"priority":4}},"9dkltlcl7ause9n3oy3d92kwdloezffx":{"type":"may","from":"kc74961o02qnvnwmg6u71blmkcy3lxrl","to":"4dbsvlojkut1lhfqs3iz2yw3rh55dmil","properties":{"priority":4,"condition":"selected"}},"404qqkvsim4jbg28g9zstfu6aqab6y7n":{"type":"may","from":"70vbli98ij6liuuh6cnu2o9pfdq1p8ak","to":"addl6fzv6grtpdiwjkh25pyf0mrse5ah","properties":{"priority":4,"condition":"selected"}},"zi9j4854lrvoe9361szzbh8trxw9ihpr":{"type":"may","from":"lokezlicdo3bqspjcjcj3t8dtrzkftpi","to":"zfm343hedwh7dxrkqhqgztxqlhvt34tr","properties":{"priority":4,"condition":"selected"}},"4la3drcjf46709hq2lj815rg8losum9x":{"type":"may","from":"ve5vmjzko24wxo6fldhspu59gybsbhmx","to":"uhepm2ymwmpqe7ohbcg6r1g6vr1yj3w9","properties":{"priority":4,"condition":"selected"}},"m6e5tm8i80fkl9cz4sk2ezz8ya8sqdy5":{"type":"may","from":"094etta0y43yynzhv1oiz8jwe3usqvth","to":"32um9oqsxh65y0qonr5oc5cenizw1nlc","properties":{"priority":4,"condition":"arrived"}},"f8n9wd3a8t6ghhnf0nr7m0wd29pu2ecu":{"type":"may","from":"32um9oqsxh65y0qonr5oc5cenizw1nlc","to":"jce7ukjn9g18l3yrieis8inqif7kriqq","properties":{"priority":4,"condition":"arrived"}},"og8xwxys9uorrvafbbb0u1dyzkpsg7us":{"type":"may","from":"zfm343hedwh7dxrkqhqgztxqlhvt34tr","to":"uvr5q9hsdrqkg97uci8jp0luanc9ob18","properties":{"priority":4,"condition":"arrived"}},"63bnf9enweetyef47nwi94577sv2hc60":{"type":"may","from":"uhepm2ymwmpqe7ohbcg6r1g6vr1yj3w9","to":"5ox9ihyrsh27d9roh3xhar5p4j2u1w4o","properties":{"priority":4,"condition":"arrived"}},"zl3femacvfghkwyitk6np8w4umw0rsdt":{"type":"may","from":"uvr5q9hsdrqkg97uci8jp0luanc9ob18","to":"fmdsuwz8grbmqfcl8dygll9jal3o7cb0","properties":{"priority":4,"condition":"arrived"}},"gthrst6ipiojhnfq6d14gxfgw71mdoni":{"type":"may","from":"uvr5q9hsdrqkg97uci8jp0luanc9ob18","to":"lrpxqr3a3m3agrfa7t3k4hh90smk7qyk","properties":{"priority":5,"condition":"arrived"}},"atdfvfkdwefz2rhw58utn7aqjsu49fnv":{"type":"may","from":"5ox9ihyrsh27d9roh3xhar5p4j2u1w4o","to":"e9a5fx69ld7l0f8s3viokulwfp7l4xe8","properties":{"priority":4,"condition":"arrived"}},"9trio1ft7o587pa28mmg3twfhpa0oh0m":{"type":"may","from":"5ox9ihyrsh27d9roh3xhar5p4j2u1w4o","to":"rrqtejecgqa829znyya4ey5894vmimde","properties":{"priority":5,"condition":"arrived"}}}}