Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

"The element 'Workflow' has invalid child element 'ProcessTriggers'" error occurs when importing a Dynamics 365 solution


View products that this article applies to.

Symptom

When attempting to import a solution in Dynamics 365, you encounter the following error:

"This solution package cannot be imported because it contains invalid XML. You can attempt to repair the file by manually editing the XML contents using the information found in the schema validation errors, or you can contact your solution provider.

Error code 8004801a."

If you click Technical Details, you see the following message along with additional error details:

"Schema validation of the customizations.xml file within the compressed solution package file failed. To manually validate and edit the file, you can download the schema file here and use an XML editor that supports schema validation to get more details."

The textbox showing additional details includes the following information:

"The element 'Workflow' has invalid child element 'ProcessTriggers'. List of possible elements expected: 'XamlFileName, ImageFileName, Type, Subprocess, Category, Mode, LanguageCode, Scope, OnDemand, TriggerOnUpdateAttributeList, TriggerOnCreate, TriggerOnDelete, AsyncAutodelete, SyncWorkflowLogOnFailure, StateCode, StatusCode, CreateStage, UpdateStage, DeleteStage, Rank, processorder, processroleassignment, RunAs, SdkMessageId, UniqueName, IsTransacted, IntroducedVersion, IsCustomizable, RendererObjectTypeCode, BusinessProcessType, FormId, PrimaryEntity'."

The textbox also includes additional details such as the name of a Business Process Flow process. If you find the name of this process, you can reference it when following the workaround included in the Resolution section of this article.

↑ Back to the top


Cause

If you export a standard Business Process Flow process and try to import it, you may encounter this error. Microsoft is aware of an issue that can cause this to occur and is planning to release a fix.

↑ Back to the top


Resolution

You can work around this issue by adding the missing <PrimaryEntity> node that is expected:

1. Extract the contents of the solution .zip file you are trying to import.

2. Open the customizations.xml file in a text editor.

3. Search for "ProcessTriggers".

4. Above the ProcessTriggers node, add the following node replacing the ReplaceEntityName text with the primary entity for the Business Process Flow:

<PrimaryEntity>ReplaceEntityName</PrimaryEntity>

Refer to the following for a before and after example:

Before:

<Workflow WorkflowId="{919e14d1-6489-4852-abd0-a63a6ecaac5d}" Name="Lead to Opportunity Sales Process" Description="This is the default process flow to work on a lead and convert it to an opportunity." unmodified="1">
<ProcessTriggers />
    </Workflow>
 

After:

<Workflow WorkflowId="{919e14d1-6489-4852-abd0-a63a6ecaac5d}" Name="Lead to Opportunity Sales Process" Description="This is the default process flow to work on a lead and convert it to an opportunity." unmodified="1">
<PrimaryEntity>lead</PrimaryEntity>      
<ProcessTriggers />
    </Workflow>

NOTE: If there are multiple Business Process Flows, you may need to add this for each of them.
 

5. Select all of the components from the solution including the modified customization.xml file and compress them into a .zip file.

6. Attempt to import the .zip file that includes these modifications.

↑ Back to the top


Article Info
Article ID : 4462895
Revision : 3
Created on : 9/7/2018
Published on : 9/7/2018
Exists online : False
Views : 284