locked
System.Exception: Action Microsoft.Crm.Tools.Admin.UpgradeWorkflowsAction failed RRS feed

  • Question

  • Hi, I am tryig to import the CRM 4.0 organization to CRM 2011 yet it shows the error during the upgrading process. Do you know any solution for that?

     

    19:57:21|  Error| Import Organization (Name=WEBSE, Id=8e4664a8-b3c4-df11-ac15-001cc0fa5c45) failed with Exception:
    Microsoft.Crm.CrmException: Upgrade Organization with Id=8e4664a8-b3c4-df11-ac15-001cc0fa5c45 failed with Exception:
    System.Exception: Action Microsoft.Crm.Tools.Admin.UpgradeWorkflowsAction failed. ---> Microsoft.Crm.CrmException: Error generating UiData ---> Microsoft.Crm.CrmException: Cannot add a step to workflow with workflowStep as a parent step since there exist at least one Stage step.
       at Microsoft.Crm.CrmException.Assert(Boolean condition, String message)
       at Microsoft.Crm.Workflow.ObjectModel.WorkflowStep.Insert(StepBase newStep)
       at Microsoft.Crm.Workflow.ObjectModel.UIDataGenerator.GenerateUIData()
       --- End of inner exception stack trace ---
       at Microsoft.Crm.Workflow.ObjectModel.UIDataGenerator.GenerateUIData()
       at Microsoft.Crm.Tools.Admin.UpgradeWorkflowsAction.VerifyBackConversionToUIData(Entity workflow, ExecutionContext context, IMetadataProvider metadataProvider, Int32 primaryEntityOtc)
       at Microsoft.Crm.Tools.Admin.UpgradeWorkflowsAction.Upgrade(Guid organizationId)
       at Microsoft.Crm.Tools.Admin.UpgradeWorkflowsAction.Do(IDictionary parameters)
       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       --- End of inner exception stack trace ---
       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       at Microsoft.Crm.Setup.Common.Installer.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationOperation.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationUpgrader.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationOperation.Execute()
       at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo) ---> System.Exception: Action Microsoft.Crm.Tools.Admin.UpgradeWorkflowsAction failed. ---> Microsoft.Crm.CrmException: Error generating UiData ---> Microsoft.Crm.CrmException: Cannot add a step to workflow with workflowStep as a parent step since there exist at least one Stage step.
       at Microsoft.Crm.CrmException.Assert(Boolean condition, String message)
       at Microsoft.Crm.Workflow.ObjectModel.WorkflowStep.Insert(StepBase newStep)
       at Microsoft.Crm.Workflow.ObjectModel.UIDataGenerator.GenerateUIData()
       --- End of inner exception stack trace ---
       at Microsoft.Crm.Workflow.ObjectModel.UIDataGenerator.GenerateUIData()
       at Microsoft.Crm.Tools.Admin.UpgradeWorkflowsAction.VerifyBackConversionToUIData(Entity workflow, ExecutionContext context, IMetadataProvider metadataProvider, Int32 primaryEntityOtc)
       at Microsoft.Crm.Tools.Admin.UpgradeWorkflowsAction.Upgrade(Guid organizationId)
       at Microsoft.Crm.Tools.Admin.UpgradeWorkflowsAction.Do(IDictionary parameters)
       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       --- End of inner exception stack trace ---
       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       at Microsoft.Crm.Setup.Common.Installer.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationOperation.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationUpgrader.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationOperation.Execute()
       at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo)
       --- End of inner exception stack trace ---
       at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo)
       at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.Execute(Object obj)
    19:57:21|   Info| GetDBUpdateRevisionThresholdForServer(): Threshold = 596.

    Friday, July 15, 2011 12:03 PM

Answers

  • Horray!!! Finally I found the solution. Go to Settings > System Job > Type : "Workflows" and View : "Suspended System Job" > Delete the items with the previous incomplete workflows. Done!!!  


    Tony Er
    • Marked as answer by Tony Er Monday, August 1, 2011 11:49 AM
    Monday, August 1, 2011 11:49 AM

All replies

  • Looks like there is a problem with the definition of a workflow rule, but unfortunately the log doesn't indicate which rule. How many workflow rules do you have ?

    I'd suggest you try one of two things:

    1. In the CRM 4.0 database, test if you can disable and edit every workflow rule. It is possible that this would show up which rule has the problem
    2. Delete the workflow rules prior to the upgrade, then recreate them after the upgrade

    Microsoft CRM MVP - http://mscrmuk.blogspot.com  http://www.excitation.co.uk
    Friday, July 15, 2011 1:29 PM
    Moderator
  • Hi David, I tried to unpublished all the workflows including workflow templates in the MS CRM 4.0 and deleted it before the upgrading to CRM 2011.

    Yet it still pop up the error message. Any other way to solve solve the problem?

    Saturday, July 16, 2011 3:05 AM
  • 1) Go to CRM 2011 Server. 

    2) Locate the file Microsoft.crm.dll (version 4.0.0.0) in the following location C:\windows\assembly\Microsoft.crm.dll (version 4.0.0.0).

    3)  Please take the backup of this file and then delete only the microsoft.crm.dll that has version 4.0.0.0 besides it. Please do not touch the files with version 5.0.0.0.

    4) If you are unable to delete the file please follow below steps :- 

                  >>Create a registry DWORD registry DisableCacheViewer at the location HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion
                  >>Set the DWORD value = 1
                  >>Go to C:\windows\assembly\GAC_MSIL\ Microsoft.crm.dll\(Open he folder and delete the file) 

    5) After the successful deletion of the file try importing the organization again using the original database backup from the CRM 4.0 server. The upgrade should complete successfully.

     

    Wednesday, July 27, 2011 12:37 AM
  • All right. I am going to try it after my lunch. Thanks for the reply.

    Monday, August 1, 2011 5:48 AM
  • Hi j0extreme, I could not find the Microsoft.crm.dll file in the folder C:\Windows\assembly and C:\Windows\assembly\GAC_MSIL . The nearest naming folder under C:\Windows\assembly\GAC_MSIL are Microsoft.Crm.Platform.Sdk , Microsoft.Crm.SdkTypeProxy and Microsoft.Crm.SdkTypeProxy.XmlSerializers  I tried to find the Microsoft.crm.dll in the Windows Folder yet  could not find it as well. Any idea?

    Monday, August 1, 2011 6:59 AM
  • Horray!!! Finally I found the solution. Go to Settings > System Job > Type : "Workflows" and View : "Suspended System Job" > Delete the items with the previous incomplete workflows. Done!!!  


    Tony Er
    • Marked as answer by Tony Er Monday, August 1, 2011 11:49 AM
    Monday, August 1, 2011 11:49 AM
  • Hi All,

    Not sure if it helps anyone anymore, but I have managed to find a workaround when I have unregistered custom workflow assemblies from CRM 4.0 and then placed them temporarily to GAC on the CRM 2011 during re-import of CRM Org. (after the actual upgrade is done).

    I id not have to delete any 'waiting' workflows and they resumed when the workflow dlls were registered back in CRM 2011 (you can use a solution) and removed from GAC... It s workaround but it might be useful when it is essential to preserve the state of workflows.



    • Edited by V-Tec G Monday, June 13, 2016 12:12 PM
    Monday, June 13, 2016 12:10 PM