Error and logging frameworks

Hi,

What are error frameworks and logging frameworks in webMethods?

Please explain these with sample framworks

Thank you.

Hi,

please clarify your question.

Regards,
Holger

Usually in webMethods projects, they do implement some logging framework right…like how to create logs for all the interfaces.
in similar way, they also implement error framework or error handling, I would like to know how are these implemented in any projects?

I was asking this question in some interview, “what is the logging framework that you are using in your project”

I have never concentrated on my projects logging framework ever, so wanted to know any sample frameworks and how are they implemented?

Hi,

you can use built-in logging pub.flow:debugLog as well as any open source framework as log4j etc.

When using open source frameworks you will have to write wrapper services to get access to library.

For error handling you can try to rely on built-in error handling by using try-catch sequences iny your services.
Remember to use pub.flow:getLastError as the first step in the catch-sequence.
If you need to propagate the error to the service which has called your service use EXIT-Step and signal failure.

Regards,
Holger

[quote]
If you need to propagate the error to the service which has called your service use EXIT-Step and signal failure.

in what way the error is propagated to the parent service?
do we need to add any variable in the parent step to retrieve that particular error?

Hi,

the parent service needs a Catch-sequence to handle the error.

Regards,
Holger

Can u please explain me in detail how to implement this?
I tried implementing this:
parent service A has child service B in it, in child service I made some code to return error(divide ints by 0)…then in catch sequence, I added getLastError as first service and Exit signal failure on second service with failure message. Then in parent service I used getLastError in catch sequence. But the error is not returning to the parent service.

Did I go wrong anywhere?
Please help

Can u please explain me in detail how to implement this?
I tried implementing this:
parent service A has child service B in it, in child service I made some code to return error(divide ints by 0)…then in catch sequence, I added getLastError as first service and Exit signal failure on second service with failure message. Then in parent service I used getLastError in catch sequence. But the error is not returning to the parent service.

Did I go wrong anywhere?
Please help