transientFlag not Working

Hi Guys,

In the subscription side, I am doing transienterror Handling. My adapter service is enabled but it is having error "Password logon no longer possible - too many failed attempts "… When the service is running it is failing but not going to transient error handling.

When I trace it is going into transient error. I am not getting why it is not working when I run the service. Could anyone help me out.

Hi Gautam

Im assuming the transient error section is outside you try catch block

You will need to code so as to explicitly catch the errors and throw it as a transient error using pub.flow:throwExceptionForRetry.

This will instruct the trigger that a transient error has occured and will excecute the retry mechanisms configured.

Check the publish-subscribe developers guide for transient error handling details…

-Varghese

The code snippet is already mentioned in the SAG documentation and if you have any issues with the implementation, contact me I can share you the code sample for resource monitoring to handle transient errors.

Hi Mahesh,

Can you specify the exact navigation path of the above document as specified capturing ’ code snippet’ for catching transient error and then throw pub.flow:throwExceptionForRetry - such as retry can happen, when configured for flow service.

Verghese - if we don’t catch the Runtime exception within catch block, then how we trap them (and throw pub.flow:throwExceptionForRetry); is it the try - finally technique you are talking about or this is something else ??

Himanshu,

Here you go!, refer chapter 41 Building Services that Retry from 9-12_Service_Development_Help.pdf

1 Like

Thanks Mahesh, that’s some useful information. The only question that I have left is, when debugging through such flow service with transient error setup - when IS retries for ISRuntimeException as thrown thru pub.flow:throwExceptionForRetry - does debugger haults on breakpoints? If not how do we determine whether the IS is really retrying?

I tried using the getRetryCount flow service in the block where I am later executing the flow:throwExceptionForRetry service but I can’t capture the count for retry. I am attaching the snippet/ screenshot of the flow service that I built to test this process out. I was generating error by changing the password of server alias it uses to connect. But still same behaviour.

Let me know.

[quote=M@he$h]
Himanshu,

Here you go!, refer chapter 41 Building Services that Retry from 9-12_Service_Development_Help.pdf

Bumping : Anyone - assistance with above follow up question be really appreciated. I assume - many of us/ you - would have gone through same dilemma/ confusion.

As per your code the errorStat flag is set to true in catch block and it should retry, try adding a debug log in the true sequence and check. I can share you a working sample if you need one.

1 Like

Thanks that helps. Yes - the code was setting errorStat flag to true in the catch block. The piece that I was missing - was putting debugLog in the true sequence - which when put generated below logs under Server Log section (with retyCounter as fetched from getRetryCount flow service printed too) - stressing system was retrying (NB: I changed retry counter to 2 here to avoid ID be locked).

Server Log Entries as of 2018-09-19 18:56:45 CDT
[249]2018-09-19 18:55:53 CDT [ISP.0090.0003C] Entering Retry Block, with current retry count as 2***
[248]2018-09-19 18:55:52 CDT [ISP.0090.0003C] Entering Retry Block, with current retry count as 1***
[247]2018-09-19 18:55:50 CDT [ISP.0090.0003C] Entering Retry Block, with current retry count as 0***