{"id":537,"date":"2019-11-22T15:13:48","date_gmt":"2019-11-22T15:13:48","guid":{"rendered":"https:\/\/sdf-docs.mansystems.com\/docs\/acr-rules\/architecture\/upcoming-recursion-check\/"},"modified":"2021-02-23T14:12:04","modified_gmt":"2021-02-23T14:12:04","slug":"microflowcallsself","status":"publish","type":"docs","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/architecture\/microflowcallsself","title":{"rendered":"Microflows should not call themselves"},"content":{"rendered":"\n<p>This rule checks if a microflow contains a recursion. A recursion is, for example:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li> When a microflow calls itself. <\/li><li> When a sub microflow calls a parent microflow.  <\/li><\/ul>\n\n\n\n<p>Recursion is a complex structure, and you should use it with caution. At the moment, Mendix does not have a built-in fail-safe for a recursion. So if for some reason the recursive calls keep going the app will crash. This can happen because of bad or misconfigured data, or a wrong exit condition.<\/p>\n\n\n\n<p>In case you decide to have a recursion (notwithstanding the above), add an emergency brake that stops the execution if the recursion executes itself too many times (for example, 200). This avoids the app from crashing. <\/p>\n\n\n\n<p><strong>Non-compliant example:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2021\/02\/image-8.png\" alt=\"\" class=\"wp-image-2026\" width=\"541\" height=\"300\" srcset=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2021\/02\/image-8.png 541w, https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2021\/02\/image-8-480x267.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 541px, 100vw\" \/><\/figure>\n\n\n\n<p><strong>Compliant example:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1016\" height=\"572\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2021\/02\/image-9.png\" alt=\"\" class=\"wp-image-2027\" srcset=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2021\/02\/image-9.png 1016w, https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2021\/02\/image-9-980x552.png 980w, https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2021\/02\/image-9-480x270.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1016px, 100vw\" \/><\/figure>\n","protected":false},"featured_media":0,"parent":99,"menu_order":12,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-537","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/537"}],"collection":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=537"}],"version-history":[{"count":6,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/537\/revisions"}],"predecessor-version":[{"id":2028,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/537\/revisions\/2028"}],"up":[{"embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/99"}],"next":[{"title":"Microflows should only rarely call microflows from other modules","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/architecture\/logicencapsulation","href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/275"}],"prev":[{"title":"Microflow should not have loops in the flow","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/architecture\/flowloops","href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/535"}],"wp:attachment":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=537"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_tag&post=537"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}