After updating to Microsoft Dynamics 365, mismatched Business Process Flow entity names between source, and target organizations can cause a Solution Import failure
This article provides a solution to an error that occurs after updating to Microsoft Dynamics 365.
Applies to: Microsoft Dynamics CRM
Original KB number: 4020021
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 (for example, 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."
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:
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.
Follow the steps below on the source (unmanaged) organization from which Solutions are created and exported.
Export As 8.1, or 8.0 the existing solution containing the Business Process Flows as an unmanaged Solution. It's done to ensure that the exported Solution doesn't contain the backing Business Process Flow entities.
De-activate (if active) and delete the Business Process Flows (which will delete the corresponding Business Process Flow entities as well, and any data in them), and the unmanaged Solution from the source system.
Update the newly exported, unmanaged Solution.
- Rename the UniqueName node of each of the Workflow nodes in the customizations.xml to use the appropriate customer Solution Publisher prefix. It's done to ensure that when this Solution is reimported 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 that is the root cause of the issue.
- 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 it. It's a known issue that will be addressed in the future. After deleting the missing dependencies, it should look like this: <MissingDependencies> </MissingDependencies>
- 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 done 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.
Import the modified, unmanaged Solution back in to the source (unmanaged) environment.
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. It can be verified by navigating to Settings, Customizations, selecting Customize the System, and validating the names of the Business Process Flow entities. They should now be using the appropriate solution prefix.
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.