search cancel

Set a Process Flow level condition to SKIP/CANCEL PROCESS FLOW when there is a copy in the Backlog.

book

Article ID: 89551

calendar_today

Updated On:

Products

CA Automic Applications Manager (AM)

Issue/Introduction

Set a Process Flow level condition to SKIP/CANCEL PROCESS FLOW when there is a copy in the Backlog.

Environment

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

Resolution

Symptoms

How do Iset a Process Flow condition to skip running the Process Flow if a copy of thesame  Process Flow is already in thebacklog?


Cause

While theSINGLE RUN feature prevents more than 1 copy of a job from RUNNING at any giventime, it does not prevent copies of these jobs from accumulating in thebacklog. This can create a largeaccumulation of copies of this job in the backlog.


Solution

In order to prevent this from happening we can use the following setup:

1. Create a subvar called #count_copies as follows:

Type: Numbers
Login: No selection

SQL Statement:

select to_char(count(*)) from so_job_queue where so_module='{job}'

2. Set a condition on the main Process Flow level as follows:

Before User Defined
If {#count_copies} > 1
Then Cancel Process Flow.