After updating to Dynamics 365, mismatched Business Process Flow entity names between source, and target organizations can cause a Solution Import failure.

Applies to: Dynamics CRM

Symptom


After creating a managed Solution from an organization that has an unmanaged Solution currently deployed that contains Business Process Flows, and then Importing the Solution to another organization. Once the Solution is imported, if both source, and target organizations are updated to Dynamics 365. Then another Solution (e.g. an updated version of the original solution) is created from the same source, and Imported with the same Business Process Flows, and their corresponding Business Process Flow entities the following error will occur "This process cannot be imported because it cannot be updated or does not have a unique name."  

Cause


When upgrading to Dynamics 365, Business Process Flows (BPF) are represented by Business Process Flow entities.  These entities are generated during the upgrade, and are named using the following format: 

<SolutionPrefix>_BPF_<ProcessId>

Because the Business Process Flow entities in the Managed Solution generated from the original organization are named differently from the entities on the second organization.  After the upgrade to Dynamics 365, the import of Solutions to the second organization will fail, because of the conflict in the Business Process Flow entity names for the same Business Process Flows.    

Resolution


Perform the following steps on the source (unmanaged) organization from which Solutions are created and exported. 

  1. Export As 8.1, or 8.0 the existing solution containing the Business Process Flows as an unmanaged Solution.  This is done to ensure that the exported Solution does not contain the backing Business Process Flow entities.
  2. De-activate (if active) and delete the Business Process Flows (this will delete the corresponding Business Process Flow entities as well, and any data in them), and the unmanaged Solution from the source system.
  3. Update the newly exported, unmanaged Solution
    1. Rename the UniqueName node of each of the Workflow nodes in the customizations.xml to use the appropriate customer Solution Publisher prefix.  This is done to ensure that when this Solution is re-imported back in to the source (unmanaged) environment, the Business Process Flow entities that get generated will have the same name as the entities present on the target organizations where Business Process Flows already exist to address the naming conflict which is the root cause of the issue.
    2. Remove the missing dependency entries (all MissingDependency nodes) for the old new_bpf_<processid> named entities from the MissingDependencies  parent node in the solution.xml file if they exist.  Ensure that the MissingDependencies parent node itself is left behind and empty after this.  This is a known issue that will be addressed in the future.  After deleting the missing dependencies it should look like this: <MissingDependencies> </MissingDependencies> 
    3. Update the version node at the start of the ImportExportXml root element in the solution.xml to be 8.1, or 8.0 depending on which version you performed the 'Export As' operation for in Step 1 above.  You can leave the minor version numbers as is.  This update is needed to ensure that the version you see here is consistent with the version for which you Exported As.  For reference (for 8.1) it will look like <ImportExportXml version="8.1.0000.0788" followed by the rest of the tag attributes.
  4. Import the modified, unmanaged Solution back in to the source (unmanaged) environment.
  5. Step 4 results in the creation of the Business Process Flows (same definition and Ids), and the associated, correctly named Business Process Flow entities properly.  This can be verified by navigating to Settings, Customizations, clicking on Customize the System, and validating the names of the Business Process Flow entities.  They should now be using the appropriate solution prefix.
  6. Now export this Solution as managed and try importing it in to your target organizations. It should now import successfully on a target organization that already contained these Business Process Flows introduced there via a managed solution before upgrade to Dynamics 365.