Reputation: 2579
We have run across the situation where we have found that
1. If the parent Logic App successfully completes, or
2. If the parent Logic App is cancelled
We observe the child Logic Apps continue to run until 'normal' completion for the child, even though the parent is no longer 'waiting'.
This is a high surprise factor to us since we would not expect the children to continue.
Is there a mechanism to forcefully stop a child logic app when the parent logic app either completes, fails or is cancelled?
Similarly to logic app children not stopping, we have also noticed that both webhooks and delays in the parent are not automatically stopped when the parent is canceled, is there a way to forcefully stop these steps?
Upvotes: 0
Views: 444
Reputation: 1984
You could send the parent workflow run id as a parameter to the child app and have steps where the child app is querying the parent logic app.
https://learn.microsoft.com/en-us/rest/api/logic/workflowtriggerhistories/get
If the parent app has stopped you terminate the child with the terminate action
Similarly, you could have as a first step in all the child apps to send their runtime ids to a blob/temp space and if the parent is stopped it could as the last step it could stop all the children from the runtime id's in the temp and then clear the temp https://learn.microsoft.com/en-us/rest/api/logic/workflowruns/cancel
Upvotes: 1