CRM2011 Workflow: What happens if the field which is used in the condition of the workflow is updated after the workflow has started?

冷暖自知 提交于 2020-01-24 02:50:32

问题


Example: Lets say I have a workflow which send an email 2 days before warranty enddate. This workflow is triggered on the "Created" of a entity.

step 1: wait condition - process timeout < (warrantyendate - 2)
     after wait: send email.

So when the record is created, the workflow is started. But what happens when the user goes back and updates the warranty enddate.

Does the workflow check the updated warranty enddate or does it still use the enddate entered when it was triggered (i.e the initial on create value)?


回答1:


My understanding is that the workflow uses the data in the system at the time of execution.

The important thing to take note here is that a workflow can be executed many times, at these times the data in the system can be different. Crm caches the state of the workflow, but not the data. Process Architecture for Microsoft Dynamics CRM 2011 describes this.

So, each time the process timeout condition is checked it will use the current value of warrantyEndDate. If the value is changed, next time the condition is checked the new value will be used.

In any case as @BenPatterson1 suggests, you are probably best just testing to be sure.




回答2:


After trying this myself, if the value of the field included in the condition changes, the workflow engine fires up from sleep(waiting) and checks the condition again.

If it meets the condition, then continues to the next step or will continue to wait.



来源:https://stackoverflow.com/questions/11867800/crm2011-workflow-what-happens-if-the-field-which-is-used-in-the-condition-of-th

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!