Ref best practice

Hello everyone,

I need to send a custom email notification in case the input file is not present in the init of the ref. In particular in the “If first run” and also if it fails to login (always in the init) to the web portal.

Where to send the system or business error notification email? Better in the end, managing an if condition with system.message = “custom message” or better in the catch?

Hi @andreus91 ,

Its better if you include a File Exists Activity and an If Activity to check the condition in the Init itself, and then send a mail in the Then Section, because otherwise it will start consuming the Transaction Items and then run into the File not found error.


Kind Regards,
Ashwin A.K

in this case after sending the email it would continue to process the transactions. I could handle this by putting a throw after sending the email so that it goes into the end.

But I wanted to understand how to manage in an optimal way all the possible exceptions that could happen in the init

we would recommend to centralize such notifications and doing it on the end, as it was failing on the init / first run.

Here the transaction number (counter) can help for identifying that it was failing in this phase

1 Like

Thanks peter, imagine that in the end I need to write a report (which will be populated only in case I handled at least one transaction) and that in the init I have 2 BE (file not present, file already open) and one SE (login failed).

So, at End state level, how do I manage the various email communications, also considering that for each one I will have to send a different message, without inserting multiple innested if?