Custom workflow activity - bulk edit

This question is not answered

I have an issue with a custom workflow activity which calls the CRM Web Service.  The custom workflow activity, is triggered when a field is changed on a custom entity.

For one record, this workflow works as intended.  However, when I use the multi-edit feature, all the workflows triggered appears stuck on that custom activity (I have to click "Resume" on the workflow).

Has anyone else run into this issue?

All Replies
  • Are you on CRM On-Prem?

  • I am using CRM On-prem.

    Below is the exception:

    Workflow paused due to error: Unhandled Exception: System.Activities.InvalidWorkflowException: Connect encounted an error (Connect encounted a fault exception (ValidateClosed - Db GetCreateConnection() should be closed on End) while retrieving the 'Participant Off' Allocation Scenario entity) while processing workflow step 'Participant Off' after checkpoint Retrieved Participation allocations

      at Connect.WF.Participation.ParticiptantOff2.ParticipantOff.Execute(CodeActivityContext executionContext)

      at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)

      at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

    Inner Exception: System.Activities.InvalidWorkflowException: Connect encounted a fault exception (ValidateClosed - Db GetCreateConnection() should be closed on End) while retrieving the 'Participant Off' Allocation Scenario entity

      at Connect.WF.Participation.ParticiptantOff2.ParticipantOff.Execute(CodeActivityContext executionContext)

  • Hi larranz,

    Are you defining context variables (IOrganizationService, IExecutionContext, etc.) as global in the custom workflow activity?

    Ale

    Alejandro Cesetti

    System Engineer

    Microsoft Dynamics CRM Consultant