Business Process Flow Instance Exists error after CRM 2016 upgrade

Question Status

Verified
ISSADMIN asked a question on 4 Apr 2017 2:15 PM

We’re seeing the following error in CRM when opening an opportunity since we upgraded to 2016 on premise.

We are also seeing a similar error whenever we access a case (incident). I’ve been able to deactivate all but 3 Business Process Flows (Lead to Opportunity Sales Process, Opportunity Sales Process, and Phone to Case Process). These 3 that came over from CRM2015 during our recent upgrade throw exceptions whenever I try to deactivate them.

Note that the 3 that are still active each has a create date/time before we installed CRM 2016. All those that I was able to deactivate (After Meeting, Expired Process, Follow up with Opportunity, New Process, Translation Process, and Update Contact) have a date/time of 3/24/2017, suggesting that they’re new with CRM 2016. The older ones that were in CRM2015 and migrated to CRM 2016 cannot be deactivated.

The web page https://community.dynamics.com/crm/f/117/t/217471?pi51685=1#responses seems to discuss this exact scenario, with a final comment that Update 5 (8.2.0.0788) fixes this problem. We’re currently at 8.2.0.0749. Part of that discussion refers to some scripts that Microsoft has been able to run, I believe for Online users, to fix this problem before Update 5 was available. Does anyone know how to fix this in an on premise install?

In case it matters, I set the System Setting "Use legacy form rendering" to ‘Yes’ to resolve another error where new Notes could not be added to existing entities.

Below, I’ve pasted a trace from the CRM Trace log showing the error I get when I try to deactivate any of these 3.

[2017-04-04 13:09:37.786] Process: w3wp |Organization:d41a6f63-3e90-4883-a01e-cd316b027957 |Thread:   18(MSCRM:-NotificationManager.NotificationWatcherThreadProc) |Category: Exception |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 00000000-0000-0000-0000-000000000000 |ActivityId: 4241dd22-3d3d-4981-adc2-d730e916efb7 | NotificationManager.InvokeEventHandlers  ilOffset = 0x6D

                at NotificationManager.InvokeEventHandlers(INotificationsProvider currentProvider, NotificationEvent notification, List`1 eventHandlers)  ilOffset = 0x6D

                at NotificationManager.NotificationWatcherThreadProc(Object locatorServiceContext)  ilOffset = 0xEB

                at ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)  ilOffset = 0x79

                at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)  ilOffset = 0x9

                at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)  ilOffset = 0x34

                at ThreadHelper.ThreadStart(Object obj)  ilOffset = 0x32

>delegate Microsoft.Crm.Caching.WorkflowDependencyCache:NotificationHandler for eventId netProcessStateChanged threw an exception: System.NullReferenceException: Object reference not set to an instance of an object.

   at Microsoft.Crm.Caching.WorkflowDependencyCache.NotificationHandler(NotificationEventArgs args)

   at Microsoft.Crm.NotificationManager.InvokeEventHandlers(INotificationsProvider currentProvider, NotificationEvent notification, List`1 eventHandlers)

[2017-04-04 13:09:37.973] Process: w3wp |Organization:d41a6f63-3e90-4883-a01e-cd316b027957 |Thread:   16 |Category: Platform.Sdk |User: 6115b4e9-49c1-415c-8f20-79dca370f727 |Level: Error |ReqId: d2ff8cfb-3fd3-4377-8074-e6529b211f77 |ActivityId: d2ff8cfb-3fd3-4377-8074-e6529b211f77 | 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)

   at Microsoft.Crm.Sdk.Metadata.MetadataServiceProvider.CreateBpfEntity(BusinessEntityMoniker moniker, ExecutionContext context)

.

[2017-04-04 13:09:37.973] Process: w3wp |Organization:d41a6f63-3e90-4883-a01e-cd316b027957 |Thread:   16 |Category: Exception |User: 6115b4e9-49c1-415c-8f20-79dca370f727 |Level: Error |ReqId: d2ff8cfb-3fd3-4377-8074-e6529b211f77 |ActivityId: d2ff8cfb-3fd3-4377-8074-e6529b211f77 | CrmException..ctor  ilOffset = 0x11

                at CrmException..ctor(Exception innerException, Int32 errorCode, Object[] arguments)  ilOffset = 0x11

                at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)  ilOffset = 0x64

                at PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)  ilOffset = 0x93

                at Pipeline.Execute(PipelineExecutionContext context)  ilOffset = 0xDE

                at PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)  ilOffset = 0x35

                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 ExternalMessageDispatcher.Execute(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)  ilOffset = 0x0

                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 = 0x0

                at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext)  ilOffset = 0x4B

                at OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext)  ilOffset = 0x0

                at InprocessServiceProxy.ExecuteCore(OrganizationRequest request)  ilOffset = 0x34

                at PlatformCommand.XrmExecuteInternal()  ilOffset = 0xBC

                at DeactivateDialogPage.ProcessPostBack()  ilOffset = 0x54A

                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 = 0x34

                at Page.ProcessRequest()  ilOffset = 0x14

                at Page.ProcessRequest(HttpContext context)  ilOffset = 0x38

                at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()  ilOffset = 0x18D

                at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)  ilOffset = 0x15

                at PipelineStepManager.ResumeSteps(Exception error)  ilOffset = 0x27A

                at HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)  ilOffset = 0x31

                at HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)  ilOffset = 0xB0

                at PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)  ilOffset = 0x131

                at PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)  ilOffset = 0x0

                at UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)  ilOffset = 0xFFFFFFFF

                at UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)  ilOffset = 0xFFFFFFFF

                at PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)  ilOffset = 0x1E7

                at PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)  ilOffset = 0x0

>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)

   at Microsoft.Crm.Sdk.Metadata.MetadataServiceProvider.CreateBpfEntity(BusinessEntityMoniker moniker, ExecutionContext context)

[2017-04-04 13:09:37.973] Process: w3wp |Organization:d41a6f63-3e90-4883-a01e-cd316b027957 |Thread:   16 |Category: Platform |User: 6115b4e9-49c1-415c-8f20-79dca370f727 |Level: Error |ReqId: d2ff8cfb-3fd3-4377-8074-e6529b211f77 |ActivityId: d2ff8cfb-3fd3-4377-8074-e6529b211f77 | MessageProcessor.Execute  ilOffset = 0x218

>MessageProcessor fail to process message 'SetStateDynamicEntity' for 'workflow'.

[2017-04-04 13:09:38.051] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:   16 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: d2ff8cfb-3fd3-4377-8074-e6529b211f77 |ActivityId: d2ff8cfb-3fd3-4377-8074-e6529b211f77 | ExceptionConverter.ToSingleFaultOther  ilOffset = 0x30

>System.NullReferenceException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #3DE80E34: System.NullReferenceException: Object reference not set to an instance of an object.

   at Microsoft.Crm.Metadata.BusinessProcessFlowEntityBuilder.CreateBpfEntity(Boolean ignoreActivationState)

   at Microsoft.Crm.Sdk.Metadata.MetadataServiceProvider.CreateBpfEntity(BusinessEntityMoniker moniker, ExecutionContext context)

[2017-04-04 13:09:38.051] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:   16 |Category: Exception |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: d2ff8cfb-3fd3-4377-8074-e6529b211f77 |ActivityId: d2ff8cfb-3fd3-4377-8074-e6529b211f77 | ExceptionUtility.CreateCrmExceptionFromServiceFault  ilOffset = 0x1B

                at ExceptionUtility.CreateCrmExceptionFromServiceFault(FaultException`1 fe)  ilOffset = 0x1B

                at PlatformCommand.XrmExecuteInternal()  ilOffset = 0xBC

                at DeactivateDialogPage.ProcessPostBack()  ilOffset = 0x54A

                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 = 0x34

                at Page.ProcessRequest()  ilOffset = 0x14

                at Page.ProcessRequest(HttpContext context)  ilOffset = 0x38

                at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()  ilOffset = 0x18D

                at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)  ilOffset = 0x15

                at PipelineStepManager.ResumeSteps(Exception error)  ilOffset = 0x27A

                at HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)  ilOffset = 0x31

                at HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)  ilOffset = 0xB0

                at PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)  ilOffset = 0x131

                at PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)  ilOffset = 0x0

                at UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)  ilOffset = 0xFFFFFFFF

                at UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)  ilOffset = 0xFFFFFFFF

                at PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)  ilOffset = 0x1E7

                at PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)  ilOffset = 0x0

>Crm Exception: Message: An unexpected error occurred., ErrorCode: -2147220970

[2017-04-04 13:09:38.051] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:   16 |Category: Application |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: d2ff8cfb-3fd3-4377-8074-e6529b211f77 |ActivityId: d2ff8cfb-3fd3-4377-8074-e6529b211f77 | HttpApplication.RecordError  ilOffset = 0x41

>Request https://crm.isscorp.com/ISS/_grid/cmds/dlg_deactivate.aspx?iId={919E14D1-6489-4852-ABD0-A63A6ECAAC5D}&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-04-04 13:09:38.051] Process: w3wp |Organization:d41a6f63-3e90-4883-a01e-cd316b027957 |Thread:   16 |Category: Application |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: d2ff8cfb-3fd3-4377-8074-e6529b211f77 |ActivityId: d2ff8cfb-3fd3-4377-8074-e6529b211f77 | MainApplication.Application_Error  ilOffset = 0xB5

>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: https://crm.isscorp.com/ISS/_grid/cmds/dlg_deactivate.aspx?iId=%7b919E14D1-6489-4852-ABD0-A63A6ECAAC5D%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-04-04 13:09:38.051] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:   16 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: d2ff8cfb-3fd3-4377-8074-e6529b211f77 |ActivityId: d2ff8cfb-3fd3-4377-8074-e6529b211f77 | ExceptionConverter.ToSingleFaultOther  ilOffset = 0x30

>System.Web.HttpUnhandledException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #B86F6EB2: 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-04-04 13:09:38.129] Process: w3wp |Organization:d41a6f63-3e90-4883-a01e-cd316b027957 |Thread:   18(MSCRM:-NotificationManager.NotificationWatcherThreadProc) |Category: Exception |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 00000000-0000-0000-0000-000000000000 |ActivityId: 4241dd22-3d3d-4981-adc2-d730e916efb7 | NotificationManager.InvokeEventHandlers  ilOffset = 0x6D

                at NotificationManager.InvokeEventHandlers(INotificationsProvider currentProvider, NotificationEvent notification, List`1 eventHandlers)  ilOffset = 0x6D

                at NotificationManager.NotificationWatcherThreadProc(Object locatorServiceContext)  ilOffset = 0xEB

                at ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)  ilOffset = 0x79

                at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)  ilOffset = 0x9

                at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)  ilOffset = 0x34

                at ThreadHelper.ThreadStart(Object obj)  ilOffset = 0x32

>delegate Microsoft.Crm.Caching.WorkflowDependencyCache:NotificationHandler for eventId netProcessStateChanged threw an exception: System.NullReferenceException: Object reference not set to an instance of an object.

   at Microsoft.Crm.Caching.WorkflowDependencyCache.NotificationHandler(NotificationEventArgs args)

   at Microsoft.Crm.NotificationManager.InvokeEventHandlers(INotificationsProvider currentProvider, NotificationEvent notification, List`1 eventHandlers)

Reply
Verified Answer
ISSADMIN responded on 13 Apr 2017 1:43 PM

We contacted Microsoft Support ourselves and they ran the below SQL queries to fix the problem.

SELECT name, Workflowid, WorkflowIdUnique, CreatedOn, overwritetime FROM workflowbase WHERE name = 'Opportunity Sales Process'

UPDATE WorkflowBase SET UniqueName = 'opportunitysalesprocess' WHERE WorkflowId = '3E8EBEE6-A2BC-4451-9C5F-B146B085413A'

select Businessprocesstype, UniqueName, statecode, statuscode, workflowid from workflowbase where category = 4

Select UniqueName, statecode, statuscode, BusinessProcessType, SupportingSolutionId, * from workflowbase where WorkflowId = '3E8EBEE6-A2BC-4451-9C5F-B146B085413A'

update WorkflowBase

Set SupportingSolutionId = NULL

where WorkflowId =  '3E8EBEE6-A2BC-4451-9C5F-B146B085413A'

UPDATE WorkflowBase SET BusinessProcessType = 0 WHERE Category = 4 and BusinessProcessType is NULL

UPDATE WorkflowBase SET UniqueName = 'phonetocaseprocess' WHERE WorkflowId = '0FFBCDE4-61C1-4355-AA89-AA1D7B2B8792'

UPDATE WorkflowBase SET UniqueName = 'leadtoopportunitysalesprocess' WHERE WorkflowId = '919E14D1-6489-4852-ABD0-A63A6ECAAC5D'

Reply
ARDEE responded on 24 Apr 2017 9:06 AM

You are an absolute star for sharing with us on-premise users the fix that Microsoft did for you!  I ran those SQL queries and it fixed our problem!

Thank you soooooo much!

Reply
Philips464 responded on 3 May 2017 2:49 AM

Nice. This worked fine for me too!

Reply
Verified Answer
ISSADMIN responded on 13 Apr 2017 1:43 PM

We contacted Microsoft Support ourselves and they ran the below SQL queries to fix the problem.

SELECT name, Workflowid, WorkflowIdUnique, CreatedOn, overwritetime FROM workflowbase WHERE name = 'Opportunity Sales Process'

UPDATE WorkflowBase SET UniqueName = 'opportunitysalesprocess' WHERE WorkflowId = '3E8EBEE6-A2BC-4451-9C5F-B146B085413A'

select Businessprocesstype, UniqueName, statecode, statuscode, workflowid from workflowbase where category = 4

Select UniqueName, statecode, statuscode, BusinessProcessType, SupportingSolutionId, * from workflowbase where WorkflowId = '3E8EBEE6-A2BC-4451-9C5F-B146B085413A'

update WorkflowBase

Set SupportingSolutionId = NULL

where WorkflowId =  '3E8EBEE6-A2BC-4451-9C5F-B146B085413A'

UPDATE WorkflowBase SET BusinessProcessType = 0 WHERE Category = 4 and BusinessProcessType is NULL

UPDATE WorkflowBase SET UniqueName = 'phonetocaseprocess' WHERE WorkflowId = '0FFBCDE4-61C1-4355-AA89-AA1D7B2B8792'

UPDATE WorkflowBase SET UniqueName = 'leadtoopportunitysalesprocess' WHERE WorkflowId = '919E14D1-6489-4852-ABD0-A63A6ECAAC5D'

Reply