创建一个dynamics 365 CRM online plugin (九) - Context.Depth (not finished)

让我们来看看官方文档是怎么讲的 https://docs.microsoft.com/en-us/previous-versions/dynamicscrm-2016/developers-guide/gg326836(v=crm.8)

Every time a running plug-in or Workflow issues a message request to the Web services that triggers another plug-in or Workflow to execute, the Depth property of the execution context is increased. If the depth property increments to its maximum value within the configured time limit, the platform considers this behavior an infinite loop and further plug-in or Workflow execution is aborted.

The maximum depth (8) and time limit (one hour) are configurable by the Microsoft Dynamics 365 administrator using the PowerShell command Set-CrmSetting. The setting is WorkflowSettings.MaxDepth. For more information, see, “Administer the deployment using Windows PowerShell” in the Deploying and administering Microsoft Dynamics CRM.

 每当一个plugin或者workflow触发了一个请求到web service 并且触发了另一个plugin 和workflow去执行, Depth这个property会增长.如果在规定的时间内增长到最大值,CRM平台会认为这是一个infinit loop, 并且未来的plugin 和 worklow执行将会失败.

depth的最大值为8, 最大时间为1小时.

猜你喜欢

转载自www.cnblogs.com/TheMiao/p/10766112.html