Hi All,
When ever I am getting System exception at Initialization state , even though I have set the Email trigger , its not sending any notifications.
Hi All,
When ever I am getting System exception at Initialization state , even though I have set the Email trigger , its not sending any notifications.
Hey @marina.dutta
Are you sending the email notification directly from within the process or are you relying on Orchestrator-level alerts like email notifications for failed jobs?
I ask because if the exception happens during Initialization and is caught internally - inside a Try-Catch, then from Orchestrator’s perspective the job might still finish as “Success”, and no email alert will be triggered.
If you are using RE frame work could you check whether you incorporated send exception email in end process since when you get system exception in initialisation phase it will traverse to end process and finish the process.
Regards,
Kirankumar.
Linear Process:
Make sure the email notification is inside a Try-Catch block where the exception occurs. Place the Send Email activity in the Catch section to trigger when any error happens.
REFramework:
Ensure the email notification is placed in the Catch block of the Init state (inside Framework\InitAllApplications.xaml). Also, check if the exception occurs before email logic executes and confirm email activity is correctly configured.
If you found helpful please mark as a solution. Thanks
Happy Automation with UiPath
Hi @marina.dutta ,
Like above, if you see below on init catch section, you can add send outlook or other send email activity, so that you will get notified via email
In order to check if it sending exception email, i would advise you to make any voluntary error and run in Debug mode to confirm this
Also, in the End state see the below, there is no Exception activity add in End State, Please add your desired thing there
Please let me know, if you are still facing any issues, we will figure out
and mark it as solution
Happy Automation
Orchestrator alert emails are triggered only when the process is faulted and not when error occurs and successfully handled
Cheers
@Anil_G
Got it but when there is system exception at Process state also I am not get alert emails even though Sytem Exception emails are set. Below are two exception screenshot one is System Exception at Process and other is at Initilization. I dont get trigger emails for either of the two.
Hi @marina.dutta,
Can you please show where system exception emails are set in process state?
Can you show how your catch block of process state looks like?
You need to explicitly add send email activity inside system exception catch block. Mails don’t go out by default as reframework catches the exception and handles it so it’s considered success.
Regards
Sonali
As mentioned earlier you need to have the job status as failed or faulted that is when you will get alerts..even i fbot fails in process those are handled using try catch ..if failure is there in catch then you would get an alert
Where did you set the system exception email?
In catch or in set transaction status you need to add send email for you get the exception emails
Cheers
In Initialization state if it fails , it goes to end process. In the end process I have set the system exception email.
Actually when ever there is failure in Initialization , I am not getting alert . I have set up the system exception in end process state.
Thank you for sharing!
Please note that this will only send emails when system exception has occurred in initialisation state.
If system exception has occurred in process state, control will not reach here, so for that case, similar send email setup is required to be done in catch block of process state.
Hope this helps.
Regards
Sonali
Yea but I am not getting emails when system exception is occuring at Initialization step. That is my concern
Ok got it.
Use log message before if block to print the system exception.
That will help understand whether anything is there is system exception or not.
Also, running this process in debug mode by enabling breakpoints will help track the issue.
Can you also check if you have control pointing to end process from initialisation with the condition mentioned as system exception is not nothing.
It can be the case tgat control is not reaching here or its reaching but system exception is nothing.
Use log messages to print the values at different places to check.
Regards
Sonali
Ensure the email notification is placed in the Catch block of the Init state (inside Framework\InitAllApplications.xaml). Also, check if the exception occurs before email logic executes and confirm email activity is correctly configured.
If you found helpful please mark as a solution. Thanks
Happy Automation with UiPath
looks like the system exception in initialization occurred after few transactions..if so then transactionitem would not be empty and thus in the if condition it takes then side and would not send email
cheers
In this case before any transaction system exception at initialization happened. System exception happened when it tried to login to okta ?How can I get an alert email in initialization state before any transaction or exception in process state?any solution?
Hi @marina.dutta,
We usually use a boolean flag in init state to know that bot has reached end process state due to system exception in initialization rather than after completing all transactions. This boolean variable, we are keeping as false at the beginning of the workflow(try for init).
And then in end process, we check for this variable’s value, if true then send exception email. But before that, you also need to check that you have transition from init to end process like shown in below image:
And our end process state looks like below: You can simply do, if initstageerroroccurred, then send email. I have added extra step to check if error occured before reading config data itself, or after that.
Hope this helps.
Regards
Sonali
Looks like if condition is placed after close all applications in try block..as per logs close all apps failed and so it went into catch..
Move the if condition to finally block or after ther try catch so that even if it fails in try ..if condition would still run
Cheers
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.