Sei sulla pagina 1di 29

4

Batch Processing

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Batch Processes
Batch processes handle many important functions in the system
including:
The billing process (note that bills can also be created
online/ real time)
The process that monitors customers for overdue debt
The payment upload interfaced
The meter-read download and upload
and many more

4-2

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Batch Processes Are Documented In The


Application Viewer
You can see a list of all batch processes in the Application
Viewer

Click a batch control to


view its documentation
4-3

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

What You Can Count On

Batch processes are all restartable


If a batch process fails, simply re-execute it after the cause
of the problem is corrected. The process will know where it
left off

Batch processes can execute concurrently with the online


system 24 x 7
Batch processes that produce extract files (e.g., the GL
interface, the bill print extract, business intelligence
extracts, etc.) can reproduce the historical output
If an extract flat file is lost or corrupted, it can always be
reproduced

4-4

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Errors
There are 3 levels of errors that can occur during a batch job:
Warnings
Non-severe errors
Severe errors
You can also configure the system to create a To Do entry for
every error (not warnings) encountered during a batch process
(youll learn about To Dos in a future chapter; for now, just
understand that a To Do entry is an item in an online in-basket)
If you do not configure the batch job to create To Do entries
for errors, the errors are written to the batch runs message
log
Refer to the Framework Administration Guide - To Do Lists - To Do Entries
Created By Background Processes for more information

4-5

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Errors

Warnings
These are unusual, but non-fatal conditions detected by the
job
An entry is created in the batch run's message log (explained
in a few slides) for each warning

Non-severe errors
These are errors that prevent the successful processing of a
unit of work, but not severe enough to abort the entire job

When these occur, all uncommitted changes are rolled back and
processing restarts where it left off (skipping the erroneous
object)

When more than X of these errors occur, the batch job will
abort (and X is a parameter that can differ for each batch job)

Severe errors
These are errors that will cause the batch job to abort
immediately

4-6

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Parallel Processing

Many processes have been designed to run in multiple


parallel threads in order to speed execution
For example, the BILLING process can be executed so that
bills are produced in multiple threads (and these threads
execute concurrently)

Running a batch process in multiple, concurrent threads is


almost always faster than running it in a single thread
Audits of every execution of every thread are maintained
Statistics with respect to number of records and start / stop
times
Informational and error messages are retained for each
thread

Refer to the Administration Guide Batch Processes Addendum for a description


of which processes can run in parallel
4-7

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Optimal Number Of Threads


Determining the optimal number of threads for each batch
process requires analysis
This is because each process is different and is dependent
on:
The data (e.g., an implementation that bills for a single service on a
quarterly basis has different performance traits than an
implementation that bills for 10 services on a monthly basis)
The hardware configuration (i.e., number of processors, speed of
your disk drives, speed of the network between the database server
and the application server)

The following is a rough guideline:

Start with one thread for every 100 MHz of application server CPU available. For example,
if you have 4, 450 MHz processors available on your application server, you can start with
18 threads to begin your testing: (450 * 4) / 100 = 18.
Refer to the Framework Administration Guide Defining Batch Processes
Optimal Thread Count for recommendations with respect to how to find the
optimal number of threads for your processes
4-8

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Parameters

When a batch process is submitted, override parameter


values can be supplied
If a parameter is not supplied, the process uses a default
value

Examples of parameters include:


Number of parallel threads

The default for all batch jobs is 1 (if you want multiple threads,
you must define a value)

Number of records between commits

The default differs per batch job (youll find the default in the
description of the batch job)

Number of minutes between cursor re-initiation

4-9

The default differs per batch job (you'll find the default in the
description of the batch job)

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Parameters

Business date
The default is always the current date

Number of errors before a job is aborted


The default varies by job but is generally between 300 and
500

Rerun number
This is used for batch jobs that produce extract files and is
only specified to re-extract historical output

Trace output switches


Some batch processes have additional parameters
For example, the bill print extract job has parameters that
define the file path and the file name of the extract file
Youll see these in the application viewer and on the batch
control page
4 - 10

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Batch Processing ERD


A batch control exists for
every batch process
A batch run exists for each
execution of a batch job

Batch
Control

If a batch run fails, the next execution


will create another execution instance
for the original run (not a new run)

Batch Run

Parameter
Type

Multiple threads will exist if a run


is submitted in parallel

Thread

Execution
Instance

Message
Log
4 - 11

Multiple execution instance


records will exist for a thread
if the thread fails and the run
is restarted
Messages, warnings and errors are
recorded for each instance

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Practice 4-1 (20 Minutes)

During this exercise, you will use the following transactions


Admin Application Viewer
Admin Batch Control
Main Batch Run Tree

4 - 12

You will use the application viewer to see a list of the batch
processes
You will then return to the application and look at the
execution history of a batch job

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Executing Batch Jobs

4 - 13

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Separate Application Servers


In production, we strongly recommend that batch jobs not run
on the same application server as the online system
This is because the JVMs are configured differently for
online use as compared to batch use
However, in pre-production environments, you can use the
same application server for both batch and online environments,
as the performance impact won't be felt due to lower volumes

4 - 14

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Submitting Ad Hoc Requests

A Main menu transaction is used to request the execution of a batch


job on an ad hoc basis

This transaction is NOT meant to replace a batch scheduling tool like


Tivoli or Control-M

Note, you can define the number of threads when you submit an ad hoc
request

Rather, it exists to simplify the ad hoc submission of a single process

This is especially useful during testing

This transaction simply inserts a request; a separate process polls


the ad hoc requests and executes them

This separate program should be set up to run every ___ minutes; see the
Installation Guide for how to enable it

When the polling process


executes the ad hoc
request, it either restarts
the last run (if it didn't
complete) or it creates a
new run
4 - 15

Batch
Control

Batch Run

Ad Hoc
Batch
Queue

A separate entry is
created for each ad hoc
request

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Instructor-Led Exercise
Watch your instructor submit a simple batch job (e.g., TDNOBC Create To Do entries for Accounts without Bill Cycles)

4 - 16

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Dependencies Between Batch Jobs

4 - 17

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Batch Process Dependencies


There are many dependencies between batch processes
For example, payment upload should run before billing
If you use Control-M (a third-party batch submission tool) and
you are a licensed user of Oracle Utilities Customer Care and
Billing, contact your projects technical architect and they can
supply the scripts necessary to implement these dependencies
in Control-M

Refer to the Administration Guide Batch Processes Addendum for a schematic


of the batch process dependencies

4 - 18

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Batch Scheduler
For those organizations that do not have a third-party batch
scheduling tool, the system is supplied with a batch scheduler
along with the appropriate job streams
Note, this scheduler can only be used to execute batch jobs
developed using the development toolkit
If you have other batch jobs that are part of your job
streams, you must acquire a third-party scheduling tool
The batch scheduler is described in a separate chapter as it has
a prerequisite of understanding Workflow Process Templates

4 - 19

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Sample and Submit

4 - 20

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Classic Batch Job Versus Sample and Submit

On an ad hoc basis, users want to send letters / email to


accounts with credit cards due to expire in the next x days
(where x is a parameter supplied by the user)
This requirement can be implemented using a classic
batch job with a parameter of threshold days
The user would submit the batch request as shown in the
previous exercise

4 - 21

Alternatively, this requirement could be implemented using


the sample and submit style of batch processing; we'll
illustrate this method over the next few slides

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Step 1: Identify The Batch Job


First, the user identifies the type of batch job they want to
submit
Note, this is initiated by selecting the Sample and Submit +
item on the Main - Batch menu
The drop-down contains a list
of the sample and submit style
batch processes

4 - 22

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Step 2: Enter The Criteria


Next, the user enters the parameters for the job

Select all accounts with credit


cards due to expire in 60 days
Create this type of customer contact
for all such accounts

Click Preview to see a sampling of


such accounts

4 - 23

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Step 3 (optional): See The Sample


This is the count of ALL accounts
that meet their criteria

Next, if the user clicks


Preview, theyll see a
small sample
of the accounts that
meet their sampling
criteria
Note: The user could
have just clicked Save
on the previous page to
submit the batch
request

If the sample looks good, click Save


to submit the batch request
4 - 24

Go back and adjust the criteria

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

The Request
The batch request will be executed as per your batch scheduling rules
You can use the Sample and Submit portal to see the status of your
requests
When the batch job runs, this will
become Complete and the customer
contacts will be created

4 - 25

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

How To

4 - 26

Creating new Sample and Submit processes is fairly


straightforward
Youll learn how to do this in the Configuration Tools
Training Class

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Some Batch Jobs Can Be Thought Of As Plug-Ins

4 - 27

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Some Processes Can Be Viewed As Plug-Ins

In the Framework chapter, we described how you could


plug in new algorithms for idiosyncratic processing
Some types of batch processes can be viewed in the same
way, i.e., if you dont like how they work, write your own
(using the base package version as a template). For
example,
ToDo creation processes (we discuss these throughout this
course)
Extract processes (we discuss these throughout the course)

4 - 28

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Review Questions

4 - 29

Copyright 2010, Oracle and/or its affiliates. All rights reserved.

Potrebbero piacerti anche