We are getting error when trying to activate/deactivate existing business process flows from 2015 to Dynamics 365.
The workflows and dialogs are working fine though
Error message in Trace log:
[2017-01-27 16:58:11.732] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 41 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 89cc9321-4d75-4b2f-b803-4f5aa4fa04bc |ActivityId: 89cc9321-4d75-4b2f-b803-4f5aa4fa04bc | ExceptionConverter.ConvertMessageAndErrorCode ilOffset = 0x26C
>System.Web.HttpUnhandledException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #8B8E3A61: System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> Microsoft.Crm.CrmException: An unexpected error occurred.
at Microsoft.Crm.Dialogs.ActivateDialogPage.ConfigureForm()
at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
[2017-01-27 17:03:20.230] Process: w3wp |Organization:387f8fdb-91f7-e511-80fa-005056117dd9 |Thread: 45 |Category: Platform.Sdk |User: a88457fc-66de-457a-bef9-47819931807e |Level: Error |ReqId: daa3c9ac-5918-413b-a380-bd9c35b12df3 |ActivityId: daa3c9ac-5918-413b-a380-bd9c35b12df3 | VersionedPluginProxyStepBase.Execute ilOffset = 0x64
>Web Service Plug-in failed in SdkMessageProcessingStepId: {45C43328-1595-44A0-9F0F-849693F67F10}; EntityName: workflow; Stage: 30; MessageName: SetStateDynamicEntity; AssemblyName: Microsoft.Crm.Extensibility.InternalOperationPlugin, Microsoft.Crm.ObjectModel, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35; ClassName: Microsoft.Crm.Extensibility.InternalOperationPlugin; Exception: Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)
at Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IServiceProvider serviceProvider)
at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
Inner Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Crm.Metadata.BusinessProcessFlowEntityBuilder.CreateBpfEntity(Boolean ignoreActivationState)
.
[2017-01-27 17:03:20.245] Process: w3wp |Organization:387f8fdb-91f7-e511-80fa-005056117dd9 |Thread: 45 |Category: Exception |User: a88457fc-66de-457a-bef9-47819931807e |Level: Error |ReqId: daa3c9ac-5918-413b-a380-bd9c35b12df3 |ActivityId: daa3c9ac-5918-413b-a380-bd9c35b12df3 | CrmException..ctor ilOffset = 0x9
at CrmException..ctor(String message, Exception innerException, Int32 errorCode, Boolean isFlowControlException, TraceCategory traceCategory) ilOffset = 0x9
at CrmException..ctor(Exception innerException, Int32 errorCode, Object[] arguments) ilOffset = 0xC
at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) ilOffset = 0x64
at PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context) ilOffset = 0x8D
at Pipeline.Execute(PipelineExecutionContext context) ilOffset = 0xDE
at <>c__DisplayClass1.<RunStage>b__0() ilOffset = 0x0
at PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context) ilOffset = 0x35
at MessageProcessor.RunStage(PipelineExecutionContext context, Int32 pipelineStage) ilOffset = 0x39
at MessageProcessor.Execute(PipelineExecutionContext context) ilOffset = 0x218
at InternalMessageDispatcher.Execute(PipelineExecutionContext context) ilOffset = 0xE4
at ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, String messageName, String requestName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, ParameterCollection fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId, Guid callerRegardingObjectId, UserType userType, Guid transactionContextId, Int32 invocationSource, Nullable`1 requestId, Version endpointVersion) ilOffset = 0x22D
at OrganizationSdkServiceInternal.ExecuteRequestRequestWithInstrumentation(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, UserAuth userAuth, Guid targetUserId, OrganizationContext context, Boolean returnResponse, Boolean checkAdminMode, Object operation, UserType targetUserType) ilOffset = 0x28B
at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, UserAuth userAuth, Guid targetUserId, Guid targetCallerRegardingObjectId, UserType targetUserType, OrganizationContext context, Boolean returnResponse, Boolean checkAdminMode) ilOffset = 0x37
at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext) ilOffset = 0x58
at OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext) ilOffset = 0x28
at InprocessServiceProxy.ExecuteCore(OrganizationRequest request) ilOffset = 0x34
at PlatformCommand.XrmExecuteInternal() ilOffset = 0x108
at DataSource.SetState(String entityName, Guid id, String state, Int32 statusCode, IOrganizationContext context) ilOffset = 0x6
at DeactivateDialogPage.ProcessPostBack() ilOffset = 0x55E
at DeactivateDialogPage.ConfigureForm() ilOffset = 0x1D4
at AppUIPage.OnPreRender(EventArgs e) ilOffset = 0x13
at Control.PreRenderRecursiveInternal() ilOffset = 0x54
at Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) ilOffset = 0x6D3
at Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) ilOffset = 0x3C
at Page.ProcessRequest() ilOffset = 0x14
at Page.ProcessRequest(HttpContext context) ilOffset = 0x33
at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() ilOffset = 0x18D
at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) ilOffset = 0x15
at PipelineStepManager.ResumeSteps(Exception error) ilOffset = 0x27C
at HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb) ilOffset = 0x31
at HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) ilOffset = 0xD3
at PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) ilOffset = 0x11E
at PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) ilOffset = 0x9
>Crm Exception: Message: An unexpected error occurred., ErrorCode: -2147220970, InnerException: System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Crm.Metadata.BusinessProcessFlowEntityBuilder.CreateBpfEntity(Boolean ignoreActivationState)
[2017-01-27 17:03:20.245] Process: w3wp |Organization:387f8fdb-91f7-e511-80fa-005056117dd9 |Thread: 45 |Category: Platform |User: a88457fc-66de-457a-bef9-47819931807e |Level: Error |ReqId: daa3c9ac-5918-413b-a380-bd9c35b12df3 |ActivityId: daa3c9ac-5918-413b-a380-bd9c35b12df3 | MessageProcessor.Execute ilOffset = 0x218
>MessageProcessor fail to process message 'SetStateDynamicEntity' for 'workflow'.
[2017-01-27 17:03:20.261] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 45 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: daa3c9ac-5918-413b-a380-bd9c35b12df3 |ActivityId: daa3c9ac-5918-413b-a380-bd9c35b12df3 | ExceptionConverter.ConvertMessageAndErrorCode ilOffset = 0x26C
>System.NullReferenceException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #FAB3385C: System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Crm.Metadata.BusinessProcessFlowEntityBuilder.CreateBpfEntity(Boolean ignoreActivationState)
[2017-01-27 17:03:20.261] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 45 |Category: Exception |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: daa3c9ac-5918-413b-a380-bd9c35b12df3 |ActivityId: daa3c9ac-5918-413b-a380-bd9c35b12df3 | CrmException..ctor ilOffset = 0x9
at CrmException..ctor(String message, Exception innerException, Int32 errorCode, Boolean isFlowControlException, TraceCategory traceCategory) ilOffset = 0x9
at CrmException..ctor(String message, Int32 errorCode) ilOffset = 0x6
at ExceptionUtility.CreateCrmExceptionFromServiceFault(FaultException`1 fe) ilOffset = 0x1B
at PlatformCommand.XrmExecuteInternal() ilOffset = 0x108
at DataSource.SetState(String entityName, Guid id, String state, Int32 statusCode, IOrganizationContext context) ilOffset = 0x6
at DeactivateDialogPage.ProcessPostBack() ilOffset = 0x55E
at DeactivateDialogPage.ConfigureForm() ilOffset = 0x1D4
at AppUIPage.OnPreRender(EventArgs e) ilOffset = 0x13
at Control.PreRenderRecursiveInternal() ilOffset = 0x54
at Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) ilOffset = 0x6D3
at Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) ilOffset = 0x3C
at Page.ProcessRequest() ilOffset = 0x14
at Page.ProcessRequest(HttpContext context) ilOffset = 0x33
at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() ilOffset = 0x18D
at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) ilOffset = 0x15
at PipelineStepManager.ResumeSteps(Exception error) ilOffset = 0x27C
at HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb) ilOffset = 0x31
at HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) ilOffset = 0xD3
at PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) ilOffset = 0x11E
at PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) ilOffset = 0x9
>Crm Exception: Message: An unexpected error occurred., ErrorCode: -2147220970
[2017-01-27 17:03:20.261] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 45 |Category: Application |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: daa3c9ac-5918-413b-a380-bd9c35b12df3 |ActivityId: daa3c9ac-5918-413b-a380-bd9c35b12df3 | MainApplication.Application_Error ilOffset = 0x9F
>Request https://{server}/_grid/cmds/dlg_deactivate.aspx?iId={3B0771FB-5B9F-421B-A7CD-DCBC349BC26E}&iIndex=0&iObjType=4703&iStateCode=-1&iStatusCode=1&iTotal=1 failed with exception System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> Microsoft.Crm.CrmException: An unexpected error occurred.
at Microsoft.Crm.Dialogs.DeactivateDialogPage.ProcessPostBack()
at Microsoft.Crm.Dialogs.DeactivateDialogPage.ConfigureForm()
at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
[2017-01-27 17:03:20.261] Process: w3wp |Organization:387f8fdb-91f7-e511-80fa-005056117dd9 |Thread: 45 |Category: Application |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: daa3c9ac-5918-413b-a380-bd9c35b12df3 |ActivityId: daa3c9ac-5918-413b-a380-bd9c35b12df3 | ErrorInformation.LogError ilOffset = 0x25
>MSCRM Error Report:
--------------------------------------------------------------------------------------------------------
Error: Exception of type 'System.Web.HttpUnhandledException' was thrown.
Error Number: 0x80040216
Error Message: An unexpected error occurred.
Error Details: An unexpected error occurred.
Source File: Not available
Line Number: Not available
Request URL: {server?/_grid/cmds/dlg_deactivate.aspx?iId=%7b3B0771FB-5B9F-421B-A7CD-DCBC349BC26E%7d&iIndex=0&iObjType=4703&iStateCode=-1&iStatusCode=1&iTotal=1
Stack Trace Info: [CrmException: An unexpected error occurred.]
at Microsoft.Crm.Dialogs.DeactivateDialogPage.ProcessPostBack()
at Microsoft.Crm.Dialogs.DeactivateDialogPage.ConfigureForm()
at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
[HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown.]
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
[2017-01-27 17:03:20.261] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 45 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: daa3c9ac-5918-413b-a380-bd9c35b12df3 |ActivityId: daa3c9ac-5918-413b-a380-bd9c35b12df3 | ExceptionConverter.ConvertMessageAndErrorCode ilOffset = 0x26C
>System.Web.HttpUnhandledException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #A64D4CE1: System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> Microsoft.Crm.CrmException: An unexpected error occurred.
at Microsoft.Crm.Dialogs.DeactivateDialogPage.ProcessPostBack()
at Microsoft.Crm.Dialogs.DeactivateDialogPage.ConfigureForm()
at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
*This post is locked for comments