{"id":1625,"date":"2011-08-08T10:35:55","date_gmt":"2011-08-08T10:35:55","guid":{"rendered":"https:\/\/www.wapshere.com\/missmiis\/?p=1625"},"modified":"2011-08-08T10:35:55","modified_gmt":"2011-08-08T10:35:55","slug":"temporaly-tripped-up","status":"publish","type":"post","link":"https:\/\/www.wapshere.com\/missmiis\/temporaly-tripped-up","title":{"rendered":"Temporaly tripped up"},"content":{"rendered":"<p>The other day I was helping a colleague with a workflow that wasn&#8217;t working. He had a number of &#8220;Set Transition&#8221; MPRs that were behaving\u00c2\u00a0as expected\u00c2\u00a0&#8211; except for one.<\/p>\n<p>Eventually the penny dropped &#8211; it was because the transition set was based on a datetime attribute &#8211; a &#8220;Temporal Set&#8221;.<\/p>\n<p><!--more--><\/p>\n<p>With temporal sets you define rules like &#8220;EmployeeStartDate after today&#8221; or &#8220;EmployeeEndDate prior to 14 days from today&#8221;, however these rules are only evaluated once per day &#8211; around 1am. This is the case <em>even though you will see the object listed\u00c2\u00a0in a Set preview<\/em>.<\/p>\n<p>So, as it turns out, with Set Tranisition MPRs, they only fire when the set re-evaluation is done: at 1am.<\/p>\n<p>However with &#8220;Grant Permission&#8221; MPRs the workflow will in fact fire immediately, as it is part of the permissioning process to making the change.<\/p>\n<p>So the moral is twofold:<\/p>\n<ul>\n<li>If you need to test a workflow then use a Grant Permission MPR, or a non-Temporal Set Transition MPR, to trigger at will; and<\/li>\n<li>Don&#8217;t be alarmed when datetime changes don&#8217;t trigger workflows immediately.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The other day I was helping a colleague with a workflow that wasn&#8217;t working. He had a number of &#8220;Set Transition&#8221; MPRs that were behaving\u00c2\u00a0as expected\u00c2\u00a0&#8211; except for one. Eventually the penny dropped &#8211; it was because the transition set was based on a datetime attribute &#8211; a &#8220;Temporal Set&#8221;.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":[]},"categories":[42,54,45],"tags":[],"class_list":["post-1625","post","type-post","status-publish","format-standard","hentry","category-fim-2010","category-sets","category-workflow"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pkp1o-qd","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/1625","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/comments?post=1625"}],"version-history":[{"count":5,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/1625\/revisions"}],"predecessor-version":[{"id":1630,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/1625\/revisions\/1630"}],"wp:attachment":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/media?parent=1625"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/categories?post=1625"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/tags?post=1625"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}