How to manually send notifications when a task fails?

How to manually send notifications when a task fails?

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?), 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).


Info
Looking for Additional Guidance?

If you require more detailed information or further assistance, please visit our comprehensive Online Documentation. Our resources are designed to help you navigate all features and functionalities effectively.