How to manually send notifications when a task fails?

Modified on Mon, 16 Dec at 12:23 PM

FIRST CREATED ON 16 December 2024  I  AUTHOR Emma Camacho


Sending E-Mail Notifications in Mail & Deploy when a task fails ensures that you’re promptly informed of any issues.


Although you can use the automatic E-Mail Notifications in Mail & Deploy (for more information, see How do I configure E-Mail Notifications in Mail & Deploy, when a Task in a Workspace fails? : Portal), sometimes more notifications are required.


Let's follow an example that sends a notification if not all the emails are successfully sent.



Original task:

The CYCLE action has the following Exception Behavior:


The Task will run without throwing exceptions even though there could be problems with one of the e-mails.


We can add some actions (the green ones) to be sure that all the e-mails were sent


vStartCount and vEndCount start with value 0 and inside the CYCLE Action their values are added 1. 


After the CYCLE Action. if vStartCount and vEndCount are equal, you know that all the emails have been sent. 


If they are not equal, you can send an e-mail  to an admin user informing that not all the e-mails were sent and you can raise an exception manually, for example, by writing an incorrect code in the EXECUTE CODE action:


The task will be shown red in the Execution Calendar (the exact error in this example will be Compilation Error).


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article