send mail on error from event manager -> error event

Hi all,

I tried to send mail when error occurred in my wmservice.
I tried to create service and subscribe that in error event.

Mail sent successfully, but I can’t get the error message.

this is the scenario :

  1. create service flow as attached
  2. subscribe service from error event
  3. try to disable jdbc connection
  4. run service which is use jdbc connection.

email sent, but there is no body.
I’am afraid there is another way to catch the error message and make it as email body.

please help.

Thanks

Hi,

the service getlastError returns error only when called as first flow step in catch block.

instead of subscribing to error event, you can try catching the error using catch block and send email.

Regards,
Naga.

You don’t need the getLastError service in event subscriber as the error information will be automatically passed to event subscriber service using the specs present at pub.event folder. And i guess, we can’t save the pipeline data in event subscriber too. So, to verify the pipeline data, use tracePipeline.

Yes that is how the event error handler works and try the above and let us know the results.

HTH,
RMG

do you mean pub.flow:tracePipeline? how can I get error detail from this java service ?
I just found ‘level’ as input and no ouput there.
I need error detail as email’s body.

I already set Email notification in my IS web server.
it’s meet my requirement for awhile.

I need the error message for custom subject and body of my email.

Please help.

Regards,

hutagaol

create a new service (to subscribe to your event) using the event specifications (inputs and outputs) present under pub.event folder.

For example,
i have created a service called error, with error spec. So it will look like as shown in screenshot.
And then register this service, as a subscriber for error event.

So when an error occurs in the server, it will automatically invokes this service and populates the input data.

thank you for your help punith reddy thalla, it really works for me.

Regards.