{"id":667,"date":"2020-01-08T12:49:47","date_gmt":"2020-01-08T12:49:47","guid":{"rendered":"https:\/\/sdf-docs.mansystems.com\/docs\/acr-rules\/reliability\/when-committing-objects-events-should-be-executed\/"},"modified":"2020-03-20T08:44:58","modified_gmt":"2020-03-20T08:44:58","slug":"commitwithoutevents","status":"publish","type":"docs","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/reliability\/commitwithoutevents","title":{"rendered":"Events should be triggered when doing a commit"},"content":{"rendered":"\n<p>There is rarely a reason to disable events during a commit. When this is done there should be a very good justification for it.<\/p>\n\n\n\n<p>Non-compliant example:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"915\" height=\"239\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-3.png\" alt=\"\" class=\"wp-image-670\" srcset=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-3.png 915w, https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-3-480x125.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 915px, 100vw\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"672\" height=\"158\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-2.png\" alt=\"\" class=\"wp-image-669\" srcset=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-2.png 672w, https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-2-480x113.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 672px, 100vw\" \/><\/figure>\n\n\n\n<p>Compliant example:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"914\" height=\"241\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-5.png\" alt=\"\" class=\"wp-image-672\" srcset=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-5.png 914w, https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-5-480x127.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 914px, 100vw\" \/><\/figure>\n","protected":false},"featured_media":0,"parent":97,"menu_order":9,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-667","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/667"}],"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=667"}],"version-history":[{"count":5,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/667\/revisions"}],"predecessor-version":[{"id":832,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/667\/revisions\/832"}],"up":[{"embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/97"}],"next":[{"title":"Expressions for \"then\" and \"else\" in an \"if\" statement should be different","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/reliability\/identicalbranches","href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/682"}],"prev":[{"title":"Entity validation rules should have an error message","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/reliability\/validationrulemessage","href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/564"}],"wp:attachment":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=667"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_tag&post=667"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}