locked
CRM 2011: workflow is not firing a plugin RRS feed

  • Question

  • Hi All,

    I have plugin A which fires a workflow by updating an attribute. This workflow update another attribute on the same entity to fire Plugin B.

    Now, Plugin A is fine Workflow is fine but Plugin B is not getting triggered.

    Thanks


    Hassan

    Monday, September 8, 2014 11:41 PM

All replies

  • Plugin B is registered on post-operation and Filtering attribute is set to the one getting updated in workflow.

    I have attached to process from Visual studio it does not even come into to the code at all. (to check if it is failing because of Depth)

    Thanks


    Hassan


    • Edited by Hassanz Tuesday, September 9, 2014 1:50 AM
    Tuesday, September 9, 2014 1:49 AM
  • Hi Hassan,

    1.  Please check if you have context.depth used in your plugin. - since plugin b trigger happens from workflow the depth with be higher.

    2. Also please check if yuu are attaching to the right process - workflows are run from sandbox processing based on isolation?, best, try to throw an exception from plugin B to see if the code is executing.

    Regards,

    Jithesh

    Tuesday, September 9, 2014 2:05 AM
  • Jitesh,

    for 1. I am checking depth in my plugin.

    For 2. I am attaching to all w3wp process because plugins execute under this process not CRMASync process which is for Custom workflow activities.

    Thanks


    Hassan

    Tuesday, September 9, 2014 2:16 AM
  • Hi Hassan,

     did you check for system job to see if the workflow is triggering? there would be a workflow expansion task if the workflow is executed - (unless you checked the checkbox to remove them on success.

    Please check that. It is also possible that the ASync is not running. I am sure you might have checked these, but just outlining the possible issues - since this is unexpected behavior.

    Regards,

    Jithesh

    Tuesday, September 9, 2014 2:28 AM
  • Jithesh,

    Thank you.

    Yes Async service running, System job is executing and it is updating the field too. The plugin B is not firing.

    I found one post regarding CRM 4 with the same issue suggesting update the field in child workflow. I have done this too. Even child workflow is not firing the plugin thanks


    Hassan

    Tuesday, September 9, 2014 3:14 AM