The "answer" in the comments looks like something generated by a language model and if you read through it, you can quickly see that it doesn't really address the question. It is a non-answer and factually incorrect (Response_Fail
action handles the failure just fine).
However, this is the reasoning I have come up with my own research:
- Perhaps unintuitively to a person with a background in programming all the execution paths / branches (including leaf actions in the workflow) are still evaluated when determining the workflow run status in Azure Logic Apps - even though the actions themselves were not executed.
- For example, in the first scenario, the
Response_OK
action was not executed: status 'Skipped'. However, it is still considered when determining the run status. Furthermore, as said action was skipped, the status of the preceding action is examined instead. And since the status for that action (precedingCompose
) was 'Failed', the entire branch is evaluated to having been failed. - If any of the branches are evaluated as 'Failed', the entire workflow run is marked as failed.
- Therefore, the failed run is, unlike stated in the response in the comments, actually caused by the
Response_OK
action, not theResponse_Fail
action.
In the second scenario, there is only one branch and its last action is successful. Hence the run is marked as succeeded.
The behavior is further explained here in the documentation.