Page 1 of 1

EMail Message Log: if process throws error

Posted: Fri Apr 22, 2011 8:48 pm
by vinnusea
Hi
Am running a bunch of process in single Turbo integrator and am able to send Email notifications if the process fail or executed successfully...
But i want to capture the Error Messages shown in Message log and send in the same email.

So finally we get the message "Process Executed Successfully" or if executed withsome errors then we can see those error messages right in the Email.

Thanks for your time

Re: EMail Message Log: if process throws error

Posted: Fri Apr 22, 2011 10:42 pm
by rkaif
You can write a Process to monitor the status of the last process executed. In that process you can use the ProcessReturnCode to get status of the most recently executed process. Later you can write the error to a File and then email the file. You will also have to put the monitor process in a chore (after the process which you would like to monitor)

But there is not built in functionality in TM1 which will give you the ability to email. You will have to use VBA Scripts or 3rd party tools.

Re: EMail Message Log: if process throws error

Posted: Sun Apr 24, 2011 12:06 am
by vinnusea
Yes thanks for the reply.

I have used SendMail.exe (3rd party tool) But this one is able to just email the message i hard code in the TI when a Processfail.This is working good.

If you dont mind can you please tell me the STEPS for Writing the Error to File and Email the File??

Thank you....

Re: EMail Message Log: if process throws error

Posted: Sun Apr 24, 2011 4:57 am
by rkaif
Look at this thread: http://forums.olapforums.com/viewtopic. ... 7627#p7627

If you will follow the instructions you will be able to find your way :)

Re: EMail Message Log: if process throws error

Posted: Mon Apr 25, 2011 8:10 pm
by lotsaram
vinnusea wrote:Yes thanks for the reply.

I have used SendMail.exe (3rd party tool) But this one is able to just email the message i hard code in the TI when a Processfail.This is working good.

If you dont mind can you please tell me the STEPS for Writing the Error to File and Email the File??

Thank you....
Steps:
- In the process that you are running that you want to test you can use the function GetProcessErrorFileName (on the Epilog). Store the string value as a variable
- Pass the variable to the calling process (via a global string variable declared in that process or by writing to a control cube)
- Use FileExists to test if the error file is present in the logging directory
- Pass the error file name to the SendMail exe as a command line argument for the attachment field
- hey presto it's done

Re: EMail Message Log: if process throws error

Posted: Tue Apr 26, 2011 12:39 am
by vinnusea
Thanks for the logical answer. Iam trying with VB script and this getting file from control cube seems to tricky and smart. Will try both and will deploy the best one. Thank you Every one for advices. you guys are great.
Thanks