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