Batch Job Scripting

Batch jobs trigger scripts through a scheduled job in contrast to a user-invoked action. For example, you can schedule a nightly batch job, with an associated script, that looks for expired permits or licenses and updates them to an expired application and/or expiration status. At a high level batch scripts contain instructions to query records based on a specified filter, evaluate each returned record and take action for each record according to certain criteria. Civic Platform provides the Batch Job portlet (Batch Jobs Portlet) from where you can use UI controls to set parameters for the associated batch job script.

Figure: Batch Jobs Portlet



In addition, Civic Platform provides a batch job transaction manager for you to control transactions by scripts. The batch job transaction manager uses the following three methods to begin, commit, and roll back transactions separately.

aa.batchJob.beginTransaction(int seconds) 
aa.batchJob.commitTransaction() 
aa.batchJob.rollbackTransaction()