This article is part of the Working with Power Automate Child Flows series and of the larger Working with Power Automate series I am writing on my experiences working with the Power Automate, which is part of the Power Platform from Microsoft. I also have a related series of articles on Power Automate with Microsoft Dynamics 365 BC.
I did some work creating a number of Power Automate flows for a colleague to use in a demo to a client. Part way through creating the flows, I started having problems with one of the flows which called a child flow; the parent failed every time it tried to call the child:
When I went into edit mode and looked at the Run a child flow action there were a lot more parameters than there should have been; the child flow was created to accept only a single parameter of the email address, but there was now a date and several location type parameters present:
I did some research and found that the child flow itself had some issues and confirmed via the Microsoft Power Automate Community forums that there is a bug with Power Automate where extra parameters can just appear. A user suggested some steps to remedy the problem which involves exporting the flow and editing some files.
I had a go at doing this was was able to successfully resolve the problem.
What I did after downloading and extrating the files from the solution, was to edit the flow JSON file to remove two sections (shown in highlights below):
"inputs": {
"schema": {
"type": "object",
"properties": {
"email": {
"title": "invarEmail",
"type": "string",
"format": "email",
"x-ms-dynamically-added": true,
"description": "Please enter an e-mail address",
"x-ms-content-hint": "EMAIL"
},
"key-button-date": {
"title": "Date",
"type": "string",
"x-ms-dynamically-added": false
},
"location": {
"type": "object",
"properties": {
"fullAddress": {
"title": "Full address",
"type": "string",
"x-ms-dynamically-added": false
},
"address": {
"type": "object",
"properties": {
"countryOrRegion": {
"title": "Country/Region",
"type": "string",
"x-ms-dynamically-added": false
},
"city": {
"title": "City",
"type": "string",
"x-ms-dynamically-added": false
},
"state": {
"title": "State",
"type": "string",
"x-ms-dynamically-added": false
},
"street": {
"title": "Street",
"type": "string",
"x-ms-dynamically-added": false
},
"postalCode": {
"title": "Postal code",
"type": "string",
"x-ms-dynamically-added": false
}
},
"required": [
"countryOrRegion",
"city",
"state",
"street",
"postalCode"
]
},
"coordinates": {
"type": "object",
"properties": {
"latitude": {
"title": "Latitude",
"type": "number",
"x-ms-dynamically-added": false
},
"longitude": {
"title": "Longitude",
"type": "number",
"x-ms-dynamically-added": false
}
},
"required": [
"latitude",
"longitude"
]
}
},
"required": [
"fullAddress",
"address",
"coordinates"
]
}
},
"required": [
"email",
"key-button-date",
"location"
]
},
The removed sections are the ones containing the extra fields which just appeared.
The next change was in the solution.xml file where I incremented the version number:
1.0.0.2
I then added the two changed files back to the solution zip file (making sure to change the version number in the name of the zip), which I then uploaded to the Power Automate portal; the flow which was erroring previously was no longer erroring.
One thing to watch out for is to avoid running any history instance of the flow which was run when the the flow had the problem, as this can re-corrupt the file.
Unfortunately, this looks to be a long standing problem although I am not sure how often it is going to cocur and if it can also happen with a flow in a managed solution.
Working with Power Automate
Working with Power Automate Child Flows
Working with Power Automate Child Flows |
---|
What are Child Flows? |
Create a Child Flow |
Change Run Only Users For Child Flow |
Add a Child Flow To a Parent Flow |
Test the Parent/Child Flow Examples |
Error Encountered Saving a Flow Which Calls a Child Flow |
Error Encountered With Surprise Extra Parameters for a Child Flow |
What should we write about next?
If there is a topic which fits the typical ones of this site, which you would like to see me write about, please use the form, below, to submit your idea.