ADF Activity Failure path not getting executed completely

Sudipta 1 Reputation point
2022-06-30T07:03:32.273+00:00

I have a simple ADF pipeline with requirements like this:

Req 1 (Success of Activity A'): 'Activity A' -> 'Activity B' -> 'If_Activity_Check_fail_flag' (On Success of 'Activity A': execute 'Activity B' and bypass 'If_Activity_Check_fail_flag' activity )

Req 2 (Failure of Activity A'): 'Activity A' -> 'setVar' activity (set fail_flag=true) -> 'Activity B' -> 'If_Activity_Check_fail_flag' (On failure of 'Activity A': set fail_flag=true ,execute 'Activity B' activity , execute 'If_Activity_Check_fail_flag' activity and FAIL, )

Within the 'If_Activity_Check_fail_flag' activity there is a 'FAIL' activity (if fail_flag=true)

Req1: I have built it and the pipeline succeeded (both 'Activity A' and 'Activity B' succeeded and 'If_Activity_Check_fail_flag' activity doesn't execute).

Req2: I have built it, but while executing if 'Activity A' fails then the 'setVar' activity is executed but after that the 'Activity B' and 'If_Activity_Check_fail_flag' activities don't execute and the pipeline succeeds.

Can anyone please help for Req2? For Req2 I want after 'setVar' activity is executed (after 'Activity A' fails), the 'Activity B' and 'If_Activity_Check_fail_flag' activities should also execute.

Thanks,

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
{count} votes

2 answers

Sort by: Most helpful
  1. Sudipta 1 Reputation point
    2022-07-01T04:16:09.47+00:00

    Given below is the pictorial representation of the issue

    216794-image.png

    0 comments No comments

  2. Nandan Hegde 36,716 Reputation points MVP Volunteer Moderator
    2022-07-01T04:43:41.843+00:00

    Hey,
    The reason is Activity B would be executed if
    Activity A is success AND Activity 'Set variable' is Success based on the flow chart that you have created.

    Its because that scenario is never possible, this flow would never proceed.

    So in order for you to achieve your use case, you need to add some additional flows as below:

    From Activity A to Activity B , add 'On Completion flow'
    From Set Variable activity to Activity B , add 'on Skip flow'

    Below blog highlights some scenarios of flows :
    https://datasharkx.wordpress.com/2021/08/19/error-logging-and-the-art-of-avoiding-redundant-activities-in-azure-data-factory/

    216875-image.png

    216808-image.png


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.