Send email when transaction successful. (Single run)

Hello
I want to send an email when the queue items are successful I know I have to put the mail part in the end process but I want to set a condition to send the email only if the transaction is successful I have tried the SystemException is nothing expression but did not works it give me an error I believe because my version too old but I can not update it.

Any suggestions?

@kalmajhad

Add the mail activities inside the Process->set transaction status framework → success

So basically after every successful transaction it will send an email

Hope it helps!

If you want to send a mail when transactions are successful but only once then in the re framework,

Inside No Data,

After the log you can set the mail activity, this will work if all queue items or excel items are finished processing.

If you dont mind, could you share what error you are facing if you use SystemException is Nothing

SystemException is a type can not used as an expression

SystemException isNot Nothing Try placing this in your if activity as below

I try it gives me the same error

I need the email to be sent once only, at the end of the run

Then it will be better if you try putting it at end when transactionItem is nothing

If "System exception IsNothing " is not working in your version of the studio
Then try creating an out argument of Boolean type at the end of the “process” state or in the “No data” transition state
and assign it as true and default value as false

In the “end process” state import that in_argument
Put an If condition as (if: in_Argument is true)
Then: send mail

Can you try SystemException.message is Nothing or SystemException.message is String.Empty

@kalmajhad

If you want to send an email only if all the transactions are successful…and dont send even if one trasanction is failed…then add a variable of boolean type say bool_Success…and assign initial value to be true in the initialize state

Then in the process state in the exception and business exception catch block use assign and assign bool_success to false

And in your end process state use if condition and check bool_success and on then side send email

Cheers

Hi @kalmajhad ,

Could you elaborate more on the Requirement ? It seems from the Error that you are facing you are using a Reserved keyword and that is the reason the error occurs.

Also, you have mentioned the version is old, Could you also state which version is that you are using ?

If you could provide a Screenshot of the Error on where exactly it is occurring, it will also helps us to suggest you the right approach for fixing it.