Hi All,
I have a requirement where I need to retry the message to be sent to the Downstream system if that system is down.For that I retry it for say 5 times with the delay of some 1 min each by using throwExceptionForRetry service . I will get the last error in the Catch block of Try-Catch sequence , then if it is an transient error ,I will set one flag say errorFlag to true.In the sequence (outside of Try-Catch) I will see if that errorFlag is true then I will use the throwExceptionForRetry service and retry for a number of times.If I have to know whether it is a transient error or not then I need to get that information from the error field in getLastError service.But the error field in getLastError doesn’t provide any error code from which I can know if it is a transient error or not.The information being returned by error field is something like this:
[ART.117.4012] Adapter Runtime (Adapter Service): Unable to run adapter service. Error occured when connecting to resource Misc:testConn.
[ART.118.5053] Adapter Runtime (Connection): Unable to get a connection to resource Misc:testConn.
The pool doesn’t have a connection available for the request.
I am thinking of storing a particular error code in a config file, read that particular config file and if that error code matches that for a transient error then only I will use throwExceptionForRetry service.Else I will log the error in the Log.But now how do I get the error code from the getLastError.Also above if I see the message being returned I get 2 different types of ART codes.Is there a way where I can get the unique error codes for Transient error and retry my service based on that.Please let me know.
Thanks,
Puneet Verma
Hey Puneet
I know this is bit late to answer this… but i thought… “Better Now than Never”
First let me tell you how we managed, errors.
We stored all the error codes in a file called " Resourse Bundle", which is a “|” (Pipe delimited) file with resolution and description to the error.
In sub-services we used the service ( throwException ) which passes the error code.
The getLastError in the catch sequence gets the error code (from Pipieline record) and this error code is used as an identifier in retreiving the resolution and description from the resourse bundle.
Hope i was clear in my description, Please let me know if u dont.
Thanks
Rakesh
Hi Rakesh,
I’m very interested in seeing how people do error handling within webMethods in the real world. I’m familiar with all the recommended “best practices” for error handling in the webMethods docs.
Your solution sounds interesting. I’d be interested in seeing sample code for your solution. Is it possible to send me a sample package to: Wayne_Leishman@yahoo.ca ?
Thanks in advance.
Wayne
Puneet,
You can get a full reference of all error codes in the document webMethods_Integration_Platform_Error_Message_Reference_6_1_and_6_1_5.pdf. Its available on Advantage.
Specific data regarding the errors you posted
ART.0117.4012E Adapter Runtime (Adapter Service): Unable to run adapter service. Error occured when connecting to resource .
Cause: An error occurred while creating a new connection to the specified resource. Additional details may may appear in adjacent log messages.
Response: This is an internal error. Contact webMethods Customer Care. Please have the following information available: system and setup specifics, journal logs, and error logs with the stack trace exposed.
ART.0118.5053E Adapter Runtime (Connection): Unable to get a connection to resource .
Cause: WmART failed to create a connection because it could not communicate with the back-end connection
Response: Check independently that the target resource is communicating and that it can be reached from the
connection. If the condition persists, contact webMethods Customer Care. Please have the following information available: system and setup specifics, journal logs, and error logs with the stack trace exposed.
Looks like ART.0118.5053E describes the condition that you’re talking about, in a more specific way.
Hope this helps. If it doesnt or if you need any other information, do let me know.
Regards,
Haragopal.