skip to Main Content

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.

2

Answers


  1. It doesn’t work that way. You are using two Conditional paths : Success and On Skip. Since you have connected both of them with the Script activity, it would run in one of these scenarios:

    1. Both success
    2. Both Skipped
    3. First Succeeded , second skipped
    4. First Skipped, second succeeded

    In all of these conditions, it will run the Script activity according to your configuration.

    You can try the below approach instead:

    1. Create a variable on pipeline level: flag .
    2. Set the default value for this variable as : False
    3. Cut the script activity
    4. Paste it inside If activity with condition of validating if Flag==’true’ then run the script activity in True block
    5. Connect the If activity with on completion conditional path

    So even if one set variable turns the value of flag to True , the script activity would run after checking the status of flag variable.

    Your solution would look like this:

    enter image description here

    Login or Signup to reply.
  2. 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

    As you are connecting Log Error activity with set variable activity using on skip (grey arrow) which detect if import data is succeeded then set import data activity which id depend on it when import data activity is failed then set import error activity is considered as skipped and it will execute the next dependent activity log error and on success (green arrow) dependency.

    • On Success (Green arrow) : Activity B only runs if Activity A has a final status of succeeded.
    • On Failure (Red arrow): Activity B only runs if Activity A has a final status of failed.
    • On Completeion (Blue arrow): Activity B runs if Activity A has a final status of succeeded or failed
    • On Skip (grey arrow): Activity B runs if Activity A has a final status of skipped.

    For your requirement you only need to connect Log Error activity to set variable activity with On Succes (green arrow) dependency as below:
    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search