azureazure-data-factory

ADF Activity getting executed even when condition is not met


I only want the Log Error activity to be executed only when any of the set variable activity executes ie: Only when there is an error.But it always executes

enter image description here

Like this enter image description here

Not sure what is wrong here.How can i configure the pipeline properly so that the Log Error executes only when there is an error.


Solution

  • Currently, when the pipeline succeeds, both set variable activities are skipped. This is an acceptable precondition for log error so it runs.

    Should there be a failure then Move File to.. will be skipped. This is when you want log error to run. I think you need to add dependency Move file(on skip) -> Log error. Retain the existing dependencies between the set variable activities and log error to ensure variables are set before logging runs.