Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Fail Activity

Hi

 

We have a main pipeline calling another data pipeline inside foreach loop (sequential mode). I see that even if the invoked pipeline fails, the iteration still continues instead of stopping. How we stop the pipeline execution if one of them failed, as they are in sequence and should be dependent on each other.

 

We have a failed activity inside the invoked pipeline, but it just executes and the second pipeline starts irrespective of the first ones status.

1 ACCEPTED SOLUTION
Yacine911
Frequent Visitor

In Fabric  pipelines, when using a ForEach loop in sequential mode, the default behavior is to continue executing iterations even if one fails. To stop execution when a failure occurs, follow these approaches:

 

Create a variable error (default value = 0).
Use an If Condition inside the ForEach loop:
       If error == 0, execute the next iteration.
        If error == 1, do nothing
Inside the if container (true). do the following:
        Add an Execute Pipeline activity to call the inner pipeline
        If the pipeline fails, set the error variable to 1.

View solution in original post

4 REPLIES 4
v-veshwara-msft
Community Support
Community Support

Hi,

Just checking in as we haven’t received an update from you. If you're still experiencing the issue, feel free to share more details so we can continue assisting you.

If the problem has been resolved, and any of the replies here helped, please mark the appropriate one as the Accepted Solution so others can benefit.

Alternatively, if you found a different approach that worked, we’d appreciate it if you could share that here to support the community.

Thank you.

v-veshwara-msft
Community Support
Community Support

Hi @Anonymous ,

We haven’t heard from you since our last response and wanted to check if your query has been resolved. If not, please provide additional details so we can assist you better.

If your issue has been resolved and a response was helpful, kindly mark it as the Accepted Solution to assist others with similar queries.

Thank you!

Yacine911
Frequent Visitor

In Fabric  pipelines, when using a ForEach loop in sequential mode, the default behavior is to continue executing iterations even if one fails. To stop execution when a failure occurs, follow these approaches:

 

Create a variable error (default value = 0).
Use an If Condition inside the ForEach loop:
       If error == 0, execute the next iteration.
        If error == 1, do nothing
Inside the if container (true). do the following:
        Add an Execute Pipeline activity to call the inner pipeline
        If the pipeline fails, set the error variable to 1.

v-veshwara-msft
Community Support
Community Support

Hi @Anonymous ,
Thank you for reaching out in Microsoft Fabric Community.
To better understand the issue and provide an accurate resolution, could you please share a screenshot of your pipeline flow, including the activities inside the ForEach loop and their dependencies.
This will help us analyze the configuration and suggest the best way to resolve the issue.

Best Regards,
Vinay.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.