The requirement to alter the failure timeout was dropped in favor of just retrying indefinitely, so I went with the following solution for the dynamic retry interval and alert grace period:

  • Added new settings to the BPL for the retry interval and alert grace period to use for the different error types
  • When error is detected, modify the RetryInterval and AlertRetryGracePeriod on the current process to use the new values.
<if name="" condition='(context.LogonResponse.LogonResult [ "No sessions are currently available")'>
<true>
<code name='' xpos='200' ypos='350' >
<![CDATA[
 $$$TRACE("LogonResponse.LogonResult indicates all sessions are used [" _ context.LogonResponse.LogonResult _ "]")
 set context.ExceptionString = $$$ERRNOAVAILABLESESSION
 set %Ensemble("%Process").RetryInterval = %Ensemble("%Process").RetryNoSessionAvailableInterval
 set %Ensemble("%Process").AlertRetryGracePeriod = %Ensemble("%Process").AlertNoSessionAvailableGracePeriod
 set status = $System.Status.Error( context.ExceptionString,"no session is available")
 ]]>
</code>
</true>
</if>
<if name="" condition='(context.LogonResponse.LogonResult [ "System Unavailable")'>
<true>
<code name='' xpos='200' ypos='350' >
<![CDATA[
 $$$TRACE("LogonResponse.LogonResult indicates system is offline [" _ context.LogonResponse.LogonResult _ "]")
 set context.ExceptionString = $$$ERRSYSTEMUNAVAILABLE
 set %Ensemble("%Process").RetryInterval = %Ensemble("%Process").RetrySystemUnavailableInterval
 set %Ensemble("%Process").AlertRetryGracePeriod = %Ensemble("%Process").AlertSystemUnavailableGracePeriod
 set status = $System.Status.Error( context.ExceptionString,"no session is available")
 ]]>
</code>
</true>
</if>