question

JohnDawson-8352 avatar image
0 Votes"
JohnDawson-8352 asked ·

Parent - Child Logic Apps

I have a Parent Logic App that fires off multiple instances of a Child Logic App, asynchronously; each Child App might take from minutes to hours to run; the Child App runs 10 - 20 instances concurrently; much more and I get throttling errors, which is another issue (I'm not asking about that, now)

Question: how can I get notified when the last Child App has finished? Do I have to poll for it? What's the easiest way to achieve this?

azure-logic-apps
· 1
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@JohnDawson-8352 Just following up here to see if my response help

0 Votes 0 ·

1 Answer

PramodValavala-MSFT avatar image
0 Votes"
PramodValavala-MSFT answered ·

Since the Child Logic Apps are being run from a Parent (via a For Each Loop I suppose), could just have an action after the for each loop that sends you an email (or other notification service that you require).

· 3 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for the suggestion, but I was hoping there might be some way within the Parent-Child Logic App; my Parent App (currently) uses a "fire and forget" (async) method, so I don't know if any other methods might work i.e. where the Parent App "waits" until all the Children are done?

0 Votes 0 ·

@JohnDawson-8352 Yes. This would all be in the Parent Logic App. The action for nested logic apps will wait until a response and/or all steps are completed.

For calls to child logic apps without a response action, ensure the Asynchronous Pattern setting is set for the action as below

async-pattern-setting-for-an-action


0 Votes 0 ·
image.png (49.5 KiB)
JohnDawson-8352 avatar image JohnDawson-8352 PramodValavala-MSFT ·

That's the business; does what I need - thanks!

I found it convenient to set the concurrency (say "N") of the Child App to the same value as the concurrency of the loop in the Parent App; if I understand it right, that means the Child App will always run N instances - at least until it's near finishing - and won't have any in a Wait state

Follow up questions:

1) Is it necessary at all to return a status in the Child App i.e. 200?
2) Could I use other statuses to let the Parent App know if an instance of the Child App failed, and therefore decide if I wanted the Parent App to fail also?

0 Votes 0 ·