Hi team,
I moved this from here: https://github.com/MicrosoftDocs/azure-docs.zh-cn/issues/678
The comments below were machine-translated
@Mr-San commented 11 hours ago — with docs.microsoft.com
Normal logic: Set variable Activity (B)-> Hive Activity (A), the dependency condition of activity B for activity A is "failure", after A fails, call B successfully, then Pipeline returns success
Found BUG: Set variable Activity (B)-> Execute Pipeline Activity (A), the dependency condition of activity B for activity A is "failure", after A fails, call B successfully, but Pipeline returns failure?
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Thanks for the feedback and bringing this to our notice . At this time we are reviewing the feedback and will update the document as appropriate .
@CeciAc @Mr-San Is this what you are seeing?
Are there any other activities failing?
I need more information to reproduce or troubleshoot your situation.
Can you share pipeline definition or pipeline run ID
Normal logic: Set variable Activity (B)-> Hive Activity (A), the dependency condition of activity B for activity A is "failure", after A fails, call B successfully, then Pipeline returns success
Found BUG: Set variable Activity (B)-> Execute Pipeline Activity (A), the dependency condition of activity B for activity A is "failure", after A fails, call B successfully, but Pipeline returns failure?
Thank you for bringing this to my attention. I will escalate the issue internally.
I removed my previous post because I misinformed you.
@Mr-San I have better information for you now.
The success / failure status of the pipeline depends upon what dependancies the failing activity has.
Rules:
Only have success branch after failure -> failure
Only have failure branch after failure -> success
Have nothing after failure -> failure
have both success and failure after failure -> failure
Examples:
failing activity only has a failure dependancy -> pipeline succeeds
failing activity only has a success dependancy -> pipeline fails
failing activity has both success and failure dependancies -> pipeline fails
failing activity has a completion dependancy -> pipeline succeeds
failing activity has completion and success dependancies -> pipeline fails
failing activity has completion and failure dependancies -> pipeline succeeds
failing activity has completion and success and failure dependancies -> pipeline fails
In your pipeline, the failing activity is "Run HQL". This activity has both success and failure dependancies. This matches the third example and the fourth rule.
However, I do have a way to re-write the logic so that parent pipeline succeeds while failing Execute Pipeline.
So for what you want, @Mr-San , you can try this:
If an activity is not run, that means it is _skipped_ . The skipped dependency means "run the next activity only if the current activity was not run." A completion dependency is fulfilled by both success or failure. A completion dependency is the opposite of a skipped dependency.
In the above, when "Run HQL" fails, stored procedure "Run Failed" is executed then the Set Variable and Hive are executed. Even though "Run success" is connected to "Run HQL" by a completion dependancy, it does not run because the skipped dependancy is not fulfilled because "Run Failed" _does_ run.
When "Run HQL" succeeds, stored procedure "Run Success" is run because the completion dependency is fulfilled, and the skipped dependency is fulfilled because "Run Failed" does not run.
If you have more questions, please let me know and I will reopen the issue.
The simple rule is:
If there is a success path, and that path is not taken, then fail the pipeline.
@MartinJaffer-MSFT , the rule appears to be even more subtle....
I think the pipeline will fail if:
I believe your last screenshot would behave identically (incl. overall success state) if the 'onCompletion' dependency is changed to an 'onSuccess' dependency, too.
Most helpful comment
So for what you want, @Mr-San , you can try this:

If an activity is not run, that means it is _skipped_ . The skipped dependency means "run the next activity only if the current activity was not run." A completion dependency is fulfilled by both success or failure. A completion dependency is the opposite of a skipped dependency.
In the above, when "Run HQL" fails, stored procedure "Run Failed" is executed then the Set Variable and Hive are executed. Even though "Run success" is connected to "Run HQL" by a completion dependancy, it does not run because the skipped dependancy is not fulfilled because "Run Failed" _does_ run.
When "Run HQL" succeeds, stored procedure "Run Success" is run because the completion dependency is fulfilled, and the skipped dependency is fulfilled because "Run Failed" does not run.
If you have more questions, please let me know and I will reopen the issue.