IBM Cúram Batch Processing For Developer


IBM Cúram has a various mechanism to process a bulk amount of data and take action on that data. It is a very important and efficient process which remove a lot of manual work from the worker. The Batch process requires a basic understanding of IBM Cúram Batch development knowledge. Here, in this tutorial, I will try to explain the batch development process instead of any business logic.
The developer can write two type of batches which are having its pros & cons. Please find more information in below section –

Sequential Batch: The developer can write sequential Batches which are more important when we want to process records or data in the same transaction.

Chunker-Streamer Batch: The chunker-streamer batch is more popular and preferred by the architect. The chunker-streamer batch helps to reduce the overall time taken by the process and increase the success rate. This process uses the chunk of records to process by multiple streamer programs which mean the failure of some records is not going to impact the whole data/records.

Please find some real time example below –

Example 1: Suppose, The caseworker want to activate all PDC case which created over the last one month then caseworker will execute this action manually and it will take a lot of time and manual effort to activate all PDC (10000+) cases. The Batch process will activate all cases within a min with accuracy.

Example 2: Suppose, There are some Cases which got ineligible due to Evidence like Income, Citizenship etc. but Client don’t want to close those cases immediately and want to wait for 50 days and want to send Notification before closing them. We can utilize Batch Process to accomplish this scenario.

Example 3: Suppose, There are reassessment happened during the daytime and due to each reassessment, a lots of Notices trigger to the Client which is not correct and needs to be tackle smartly. This is a very common scenario and required proper attention. The developer can store all the changes made by the worker and do apply changes or final action at one time through the Batch process. The developer can write a batch and schedule it on Batch Scheduler to run every night.

There are many usages of Batch which we can not cover here.

There are many Important OOTB IBM Cúram Batch used in all most in all Project.

  • Generate Instruction Line Item Batch
  • Generate  Instrument Batch
  • Generate CPM PaySlips
  • Generate Rosters With Date
  • Generate Rosters
  • Bulk IC Reassessment

The Batch Development Process

The Batch development process is very smooth and straightforward and needs some basic knowledge of Java and IBM Cúram technique like RSA modeling, Code table, DMX etc.
In IBM Cúram development, the developer should always start from the modeling and generate all required artifacts before writing any business logic.

The developer needs to model Service Layer classes and Structs in order to develop a Batch Program.

Please follow instruction below –

  • Launch The Rational Software Architecture
    • This steps will launch the RSA and all required source code (If Setup already completed)
  • Switch to the modeling perspective.
  • Expand EJBServer\Models\Custom\Custom
  • Create a new Package under the package called Service Layer. The developer can create a new package based on their requirement. Also, the developer has to set the code package option ( in order to generate the artifacts in provided package structure.
    You don’t need the Domain Definitions or Rules packages, but leave them if they already exist.
  • The Developer has to do the modeling before working on the business logic. Please find details below –
    • Model two process class for Chunker and Streamer respectively with operation as <<batch>> stereotype.
    • Model KWSampleUpdateProfileBatch class for the chunker process. The pre define operations are required as per below screenshot. The developer can use the OOTB Batch model for the reference.
    • Model KWSampleUpdateProfileBatchStream class for the streamer process. The pre define operations are required as per below screenshot. The developer can use the OOTB Batch model for the reference.
    • The developer has to model some required Structs which they can get it from the OOTB batch.

Once modeling is completed, please save all your changes. Don’t forget to save your model! Don’t execute ANT target yet.

Other Artifacts

There are some other artifacts required to develop the batch program like Code table and message file.

The developer has to add Batch Name entry in BatchProcessName codetable as it required while running batch program.

The message file is important to show the error or informational message on the logs. The developer has to create a new sample with a couple of messages.

One message is for the batch name (“Sample Batch”) and another one is for the subject line (“Sample Batch report for %1d”). These will be used while generating the report.

Here, We are done with modeling and other artifacts and we are ready to execute Ant target to generate the artifacts.

Run build generated Ant target command to generate all require artifacts.

Please refresh your eclipse and create implementation class for both chunker and streamer once above build completed successfully. These implementation class contain the business logic for chunker and streamer respectively.

Other Properties

The chunker implementation class need a couple of pre-configuration like chunk size, do not run streamer etc.
The developer has to define the properties and its corresponding values as specific to a particular Batch program. These properties can be defined in Application.prx file and will inserted into PROPERTIES entity once the developer executed database Ant target or insertproperties Ant target.
Please find all required properties below –

All batch jobs should have some parameters in the properties table. To create those, let’s create some entries for the application.prx file
1. Copy Application.prx from EJBServer\components\PCR\properties to custom\properties. You
may have to create the properties folder. if verify if it is already exist.
2. Edit this file and remove the existing property and add 5 new ones, as per the table below
Property Type Value
curam.custom.batch.samplebatch.chunksize int 2
curam.custom.batch.samplebatch.dontrunstream boolean false
curam.custom.batch.samplebatch.chunkkeywaitinterval int 1000
curam.custom.batch.samplebatch.unprocessedchunkwaitintervalint 1000
curam.custom.batch.samplebatch.processunprocessedchunks boolean false

3. Now, the developer can do the database build or insertproperties build.

4. The developer can write the business logic for chunker and streamer as per given guideline.

The Batch execution

Once the above steps like modeling and business logic implementation completed, we have to test the functionality.
The developer can test the functionality through the eclipse as well as through the command prompt. Please see how we can execute the batch through the eclipse, Please find the steps below –

  • Launch the eclipse and select the correct workspace.
  • Refresh the eclipse and verify Batch related code which you added recently.
  • Copy the name of the chunker and streamer batch as it required while configuration batch on eclipse.

Please follow below LINK to configuration and execute batch program through the eclipse.

IBM Cúram Batch execution through eclipse

The Batch tutorial completed. Hope you enjoyed the tutorials, Please provide feedback and donate to continue my post.

2 thoughts on “IBM Cúram Batch Processing For Developer”

  1. I appreciate sir… usually people dont share their curam knowledge. but you are helping other curam developers…

Leave a Reply

Your email address will not be published. Required fields are marked *