HCL Workload Automation, Version 9.4

A business scenario

This scenario outlines one of the many ways in which condition-based workload automation can help you improve your workload automation

About this task

HCL Workload Automation offers a number of powerful solutions to help make your automation smarter. For example, using the iterative workflow automation feature, you can implement iterative processing of a sequence of jobs within a job stream.

In an online retailer company, this feature is very useful, because it iterates the processing of each item in each customer order, for each order in the database, by scheduling just a single job stream.

But it is also possible to take this scenario further and make the automation even more responsive to your needs. For example, you might want to have the orders processed as soon as they are placed in the database, to ensure a quicker response to customers' requests.

You can now create the job stream that processes the orders and add a start condition to it, so that the job stream verifies that an order is placed in the database before starting. As soon as the condition is met, the job stream starts.

In the following example, the ORDERS job stream starts running as soon as an order is created in the database.

To set up this type of job processing, complete the following steps:
  1. Create the job stream definition.
  2. Define the start condition.
To create the ORDERS job stream, complete the following steps:

Procedure

  1. In the Workload Designer, create the ORDERS job stream definition.
  2. In the Start Condition tab, select Job condition met.
  3. In the Job definition field, select the job whose output condition you want to monitor: the QUERY_DB_ORDERS, the job that queries the orders in the database. This is the monitoring job.
  4. In the Workstation field, specify the workstation where the monitoring job is scheduled to run.
  5. In the Output condition value field, specify the output condition that, when met, causes the job stream to start running. In the current scenario, the condition to be met is that the number of rows in the database is higher than zero. To monitor this condition, specify the following string: ${this.NumberOfRows} > 0. As a result, the ORDERS job stream will start when the monitoring job completes with the specified output condition.
  6. Leave the Start Once check box empty to keep monitoring the condition also after it is first met. This is the default behavior.
  7. Complete the remaining tabs and fields as required and add the relevant jobs.
  8. Save the job stream.

Results

The monitoring job starts checking the orders in the database repeatedly. As soon as an order is found, the monitoring job releases the remaining part of the job stream and then completes successfully.

A new instance of the job stream is automatically resubmitted, containing the same start condition, so that the cycle iterates and verifies for the next order to be inserted in the database. By default, the job stream instances run in parallel, processing each order as it is stored in the database, and iterating for each item in the order. If you do not want the instances to run in parallel, select Queue the new instance in the Scheduling options tab. By selecting this option, the new instance starts only after the previous instance has completed.

By combining two features, the automation of iterative workflows and condition-based workload automation, you can increase control over your workflow start conditions and process orders in real time. For more information about iterative workflows, see Automation of Iterative Workflows .

Example

You can define the same scenario by using the composer command line as follows:
SCHEDULE NewYork#ORDERS
ON RUNCYCLE RC_DST "FREQ=DAILY;INTERVAL=1;BYWORKDAY"
STARTCOND JOB S_AGT#QUERY_DB_ORDERS OUTCOND "${this.NumberOfRows} > 0" INTERVAL 300
( RERUN )
:
Dallas#DBUpdate

Denver#OrderProcess

Lexington#WarehouseInfo
END
For more information about defining start conditions using the composer command line see Job stream definition.