简体   繁体   English

当工作流更新记录CRM 2011时,不会触发PlugIn

[英]PlugIn is not triggered when Workflow Update the record CRM 2011

I have a plugIn on an Entity and registered an Update Step. 我在实体上有一个插件并注册了更新步骤。 But when I update the Entity record through workflow then PlugIn is not being triggered. 但是当我通过工作流更新实体记录时,就没有触发PlugIn。 I have described the whole procedure of execution below. 我在下面描述了整个执行过程。

  1. I have a PlugInA which starts executing when EntityA record is created. 我有一个PlugInA,它在创建EntityA记录时开始执行。
  2. PlugInA create a record in another entity say EntityB which causes the PlugInB to be trigger. PlugInA在另一个实体中创建记录,说EntityB导致PlugInB被触发。
  3. On triggering, PlugInB programtically trigger the Workflow say WorkflowA. 在触发时,PlugInB以编程方式触发工作流程说WorkflowA。 WorkflowA wait for certain timeout date. WorkflowA等待某个超时日期。
  4. On time out, WorkflowA update the EntityB record. 超时时,WorkflowA更新EntityB记录。 So, In this case PlugInB should be triggered but that is not happening (PlugInB does not start execution). 因此,在这种情况下,应该触发PlugInB但是没有发生(PlugInB不会开始执行)。

Kindly let me know what can be the issue in the whole procedure described above. 请告诉我上述整个过程中可能出现的问题。

Note that, I am using CRM 2011. Moreover, If I manually update the record in EntityB then PlugInB triggers 请注意,我使用的是CRM 2011.此外,如果我手动更新EntityB中的记录,则会触发PlugInB

There are lots of possibilities why this would happen. 有很多可能性会发生这种情况。 Most likely whatever update you're doing in Workflow A for EntityB is not updating an attribute that is in the registration for PluginB to cause it to fire. 最有可能的是,您在EntityB的Workflow A中所做的任何更新都不会更新PluginB注册中的属性以使其触发。

Other possibilities include WorkflowA not actually triggering, or PluginB triggering and maybe not doing anything. 其他可能性包括WorkflowA实际上没有触发,或PluginB触发,也许没有做任何事情。

Typically - what will cause a plugin not to fire is due to context depth and other items related to the async nature of workflows. 通常情况下 - 导致插件无法触发的原因是由于上下文深度以及与工作流的异步性质相关的其他项目。 If you intend to trigger a plugin from a workflow, then the context depth will be increased ... also you need to ensure that your plugin does not call itself over and over again so I would recommend using a pre-operation plugin that does not do depth checks and cannot re-trigger itself. 如果你打算从工作流程中触发一个插件,那么上下文深度会增加......你还需要确保你的插件不会一遍又一遍地调用自己,所以我建议你使用一个没有的预操作插件做深度检查,不能重新触发自己。

But - again - this is probably the context depth check in the plugin if you do it or something related to it. 但是 - 再次 - 这可能是插件中的上下文深度检查,如果你这样做或与之相关的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM