1

Could someone please help with following scenario ?

So this Data Pipeline has multiple activities (Set Variable) targeting to Single activity Send Email (Want to make Send email a Generic activity).

So the Idea is to Capture error from each activity into a Variable and pass that variable to Send email Activity to send email having Dynamic Content .

enter image description here

But Unfortunately unless all Set Varialbes are not Completed, the send email is not being Executed.

Any thoughts ?

Cheers V!!

rbrayb
  • 46,440
  • 34
  • 114
  • 174

1 Answers1

0

There are multiple conditions where both error variables will not be set in which case no email will be sent. 1 solution is to add another set of triggers incase any of the Set variable activities is skipped. You will need to add an IF condition to check the error variables and only send the email if either of them have a value. Else do not send. In my pipeline, I have put the send email only IF the IF condition evaluates to TRUE. I set the IF condition to

or(not(equals(variables('error1'),'')),not(equals(variables('error2'),'')))

Below is screenshot of when both errors are generated. enter image description here

Below is a screenshot when 1 error is generated. The email will be sent in this case. enter image description here

Below is a screen when the other error is generated. The email will be sent in this case. enter image description here

Below is a screenshot when no error is generated. You can see that neither of the errors were set. The IF condition was completed and evaluated to False and no email will be sent. enter image description here

Anupam Chand
  • 2,209
  • 1
  • 5
  • 14
  • Isn't this should be a Bug. Because Technically speaking, either ADF should provide this function to let Invoke next activity on Completion of All preceeding activities or one preceeding activity, that would make more sense. I have multiple workaround to achieve this, but than re-usability won't be achieved. – Viral Kothari Aug 19 '22 at 07:40
  • This is not a bug. This is how ADF has been designed. ADF IS providing this feature that meets your requirement by using the completion path as shown above. Not sure about the reusability feature which you speak of but if there is some other feature you feel everyone would benefit from you can raise a ticket with Microsoft. – Anupam Chand Aug 19 '22 at 09:59