var mapper = mapperFactory.createMapperMult(["WebConvUsuRcCliConvRcCli", "RcCli", "WebAdodbLogsql"]);
var jsonConvert = new com.google.gson.GsonBuilder().create();

try {
    var resposta = [];
    var logSql = {
        'cdUsu': message.get('cdUsuAlt'),
        'tpUsu': message.get('tipoUsuario') == 'webconvenio' ? 1 : 0,
        'cdConv': 0,
        'stsCred': 0,
        'cdCli': 0,
        'cdProc': 4,
        'tbSql': ''
    }

    for (let i = 0; i < message.get('lista').size(); i++) {

        let validaUsuarioJaCadastrado = mapper.selectList("WebConvUsuRcCliConvRcCli.listarWebConvUsuRcCliConvRcCli", {
            'cdEmp': 1,
            'cdConv': message.get('lista').get(i).get('cdConv'),
            'cdCli': message.get('lista').get(i).get('cdCli'),
            'tpUsu': 1
        });

        if (validaUsuarioJaCadastrado.size() == 0) {
            let obj = {
                'cdEmp': 1,
                'cdConv': message.get('lista').get(i).get('cdConv'),
                'cdCli': message.get('lista').get(i).get('cdCli'),
                'ativo': 1,
                'tpUsu': 1,
                'prAcesso': 1,
            };

            mapper.insert("WebConvUsuRcCliConvRcCli.incluirWebConvUsuRcCliConvRcCli", obj)

            logSql.cdCli = message.get('lista').get(i).get('cdCli');
            logSql.cdConv = message.get('lista').get(i).get('cdConv');
            logSql.tbSql = 'INSERT - webConvUsuRcCliConvRcCli - ' + jsonConvert.toJson(obj);

            mapper.insert("WebAdodbLogsql.incluirWebAdodbLogsql", logSql);
        }

    }
    mapper.commit();
    resposta;
} catch (err) {
    if (err.code) {
        throw JSON.stringify(err);
    }
    throw err;
}