Automation
Batch Processing
This functionality allows the registration of batch processing routines, that can be later used in other system routines.
These Routines include:
- E-mail verification
- Server time verification
- Automatic ticket distribution with workload balancing
Before getting started
4biz Batch processing uses Quartz for scheduling and processing system routines. Therefore, before using any batch routine it is necessary to configure Quartz.
Procedure
- Access the functionality through the main Menu System > Batch Processing;
- Click on "New";
- Fill in the available fields (description, type [Java class, RhinoScript, SQL]; status; a cron expression that defines the routine execution time and the context of the routine to be executed in the system);
- Example of "Class Java" content:
br.com.4biz.citcorpore.quartz.job.JobConfiguracaoAberturaAutomaticaViaEmail4. Click on "Save".
Batch Routines
- Return the Server Time
- Type: RhinoScript
- Content:
var importNames = JavaImporter();
importNames.importPackage(Packages.java.util);
importNames.importPackage(Packages.java.lang);
importNames.importPackage(Packages.java.sql);
importNames.importPackage(Packages.br.com.citframework.util);
importNames.importPackage(Packages.br.com.citframework.integracao);
importNames.importPackage(java.io);
var print = java.lang.System.out;
var dataHoraAtual = importNames.UtilDatas.getDataHoraAtual();
print.println("DATA E HORA DO SERVIDOR: "+ dataHoraAtual);
executaConsultaCURRENT_TIMESTAMP = function(){
var jdbcEngine = new importNames.JdbcEngine("jdbc/citsmart", null);
return jdbcEngine.execSQL("select CURRENT_TIMESTAMP", null, 0);
}
var dataHoraBanco;
var listaCURRENT_TIMESTAMP = executaConsultaCURRENT_TIMESTAMP();
if((listaCURRENT_TIMESTAMP!=null)&&(listaCURRENT_TIMESTAMP.size()>0)){
for (var itElemento = listaCURRENT_TIMESTAMP.iterator(); itElemento.hasNext();){
var elemento = itElemento.next();
if (elemento!=null) {
dataHoraBanco = elemento[0];
break;
}
}
}
print.println("DATA E HORA DO BANCO DE DADOS: "+ dataHoraBanco);br.com.centralit.citcorpore.quartz.job.JobConfiguracaoAberturaAutomaticaViaEmail- Perform e-mail reading
- Type: Java Class
- Content: