Previous Next JavaScript must be enabled to correctly display this content

## 3.5 Batch Service

This topic describes the process to generate Oracle Banking Microservices Architecture (OBMA) based Batch service.

The purpose of this service is to create reader, writer and processor in which methods will be written according to business use case.

To generate Oracle Banking Microservices Architecture (OBMA) based Batch service, follow the below steps:

1. Navigate to same extension_home folder using cmder.
2. Use the command obx batch -c.
3. Inputs to be given after the command:
   - Select the product family.
   - Enter name of the service (I'll construct it as <productFamilyName>-batch<serviceName>- extended-services).
   - Enter product release version.
4. Upon successful creation of batch service, user will find a folder generated with <productFamilyName>-batch-<serviceName>-extended-services having the sample service code generated.
5. The generated code has two types of batch job template inside.o Simple job creation using spring batch features. The method name for this type of job creation is jobName(). The reader, writer, processor etc are taken from spring’s itemReader, itemWriter, itemProcessor.
6. Plato batch type job creation by keeping plato batch into consideration.

   Figure 3-24 Job Name

   Description of "Figure 3-24 Job Name"
7. The method name for this type of job creation is batchProcessJob(). In this case reader is specified as EReader, writer as TWriter and processor as ETProcessor. E means the entity to be read for this job; T means the transformed object to be persisted in the database. Hence the names are given in that manner.

   Figure 3-25 Batch Process Job

   Description of "Figure 3-25 Batch Process Job"
8. For plato batch type job, user needs to write his/her entity classes in which the business logic will be kept. For example, this is the structure of the entity class highlighted in the left.

   Figure 3-26 Plato Batch Type

   Description of "Figure 3-26 Plato Batch Type"
9. One needs to write methods for reader, writer and processor accordingly.
10. To build the service:
    1. Navigate to the service.
    2. Fire the command gradle clean build.
    3. This will create the war file of the service in the folder structure build/libs/ productFamilyName>-batch-<serviceName>-extended-services.war.

Parent topic: Service Extensions