search cancel

How can I limit the number of retries of a FAILED Component in a Process Flow?

book

Article ID: 90180

calendar_today

Updated On:

Products

CA Automic Applications Manager (AM)

Issue/Introduction

How can I limit the number of retries of a FAILED Component in a Process Flow?

Environment

Release: AAMOS499000-8.0-Automic Applications Manager-OS400 Agent
Component:

Resolution

Question / Requirements

We want a Component of a Process Flow to restart itself a certain amount of times if it fails.  How can we accomplish this?


Solution

Create a Number subvar, #count_runs, with the following SQL:

     select nvl(substr('{jobid}',length(cast ({jobid} as int))+2),0) from dual

Ensure that the Component is not set to 'Restart on Abort' at the job level.  Then you will add one conditional to the Component in the Process Flow similar to this:

     1     AFTER     Continuous     {#count_runs}  LT  5     Restart on Abort

When you run the Process Flow if the Component Fails it is restarted 5 times and then it will stop.