locked
Business Flow process failure -- A business process flow already exists for the target record and could not be created. RRS feed

  • Question

  • Business Process Flow Instance Exists

    A business process flow already exists for the target record and could not be created. Please contact your system administrator. If you contact support, please provide the technical details.

    A pretty serious problem -- our newly upgraded on-premise installation of Dynamics CRM 365 (i.e. 2016 with the recent updates) has an annoying bug for a built-in business process. If a user opens an account record such message as per above is shown. That is not the real problem though. What is really annoying -- due to this error it is not possible to save any changes for this record. When trying to save this message is shown again, instead of saving.

    Therefore one cannot disable the already activated business flow. Using PROCESS>>Switch Process (or Abandon) ends up with the same error.

    More specific information from the log:

    The Web Service plug-in failed in OrganizationId: ; SdkMessageProcessingStepId: ;
     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)
    .

    Monday, January 9, 2017 5:13 PM

All replies

  • Hi,

    Did you find any solution to this? I'm getting a similar error but when moving to the next step in a Business Process Flow on an Upgraded Dynamics 365 org.

    Thanks,

    Scott


    Scott Durow
    Blog www.develop1.net    Follow Me
    Rockstar365
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Friday, January 13, 2017 3:55 PM
    Answerer
  • I'm having the same issue with my updated Dynamics 365 environment as well....Following this post for updates

    Brian Begley XRM Services LLC bbegley at xrmservices.com If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Friday, January 13, 2017 7:48 PM
  • Hi,

    I have the same error with the Dynamics 365 update of December.  I wasn't able to resolve his properly in CRM, anyway I found 2 workarounds.

    You can disable the process directly on the database, this is  not supported, but it's a workaround that I found to continue to test the last version (Isn't a prod environnement) .

    Or if you upgrade your CRM database in 2 steps, you can disable the process. You need first to apply the CRM 2016 update (before the 365 update), you open CRM and here you disable the business process, and after you apply the 365 update and the default business process wil be disable.

    I'm interesting if you find the option to disable it directly in the 365 version.

    Regards,

    Guillaume


    Guillaume Aldata Solution

    Monday, January 16, 2017 9:41 AM
  • I also have the same issue and now found out this is also an issue on-premise for Dynamics 365 for any BPF that was created 2015.
    The solution must be updating the database for entity "workflowBase" and change column "Business Process Type" from NULL (which is causing the issue) to 0 (zero) for that record. You will immediately be able to successfully deactivate your BPF. Afterwards you can activate your process again.

    Wednesday, February 15, 2017 5:15 PM
  • Hi,

    Updating the column in the database worked for me excellent - seems to be a problem just with bpf!

    Many thanks!

    Best regards,

    Andreas


    Andreas Buchinger
    Microsoft Dynamics Certified Technology Specialist

    Tuesday, February 21, 2017 2:27 PM
  • Note that this could happen in an on-premise Dynamics 365 environment that started out with a CRM 2016 install as well.  Tthe BusinessProcessType column must be something new that was added and Microsoft probably didn't account for existing workflows and business process flows when this was added.

    Chad Rexin

    Tuesday, March 7, 2017 3:38 PM
  • Thank you it worked. Here is the Query if anyone needs it: 

    update dbo.WorkflowBase set BusinessProcessType=0 where BusinessProcessType is NULL
    Wednesday, August 23, 2017 8:42 AM