var mapper = mapperFactory.createMapperMult(["GlbScheduleArquivos", "GlbScheduleJob"]);
try{
    let sdf = new java.text.SimpleDateFormat('dd/MM/yyyy HH:mm:ss');
    let dateString = sdf.format(new java.util.Date());

    let agendamento = new java.util.HashMap();
    agendamento.put('cdUsu', message.get('cdUsu'));
    agendamento.put('arquivo', message.get('arquivo'));
    agendamento.put('nmArquivo', message.get('nmSchedule') + '_' + message.get('cdUsu') + '_' + dateString);

    this.mapper.insert("GlbScheduleArquivos.agendar", agendamento);

    let job = {
        'cdCtrArquivo': agendamento.get('cdCtr'),
        'nmSchedule': message.get('nmSchedule'),
        'stepScript': 1,
        'sts': 0,
        'tpAgd': 1,
        'cdUsu': message.get('cdUsu')
    };

    this.mapper.insert('GlbScheduleJob.incluirGlbScheduleJob', job);
    this.mapper.commit();

}catch(err){
    this.mapper.rollback();
    throw err;
}