index.js
function initBLModel(req, res, cb) {
    let modelName = config.model;
    if (req.soajs.servicesConfig && req.soajs.servicesConfig.model) {
        modelName = req.soajs.servicesConfig.model;
    }
    if (process.env.SOAJS_TEST && req.soajs.inputmaskData.model) {
        modelName = req.soajs.inputmaskData.model;
    }
    BLModule.init(modelName, function (error, BL) {
        if (error) {
            req.soajs.log.error(error);
            return res.json(req.soajs.buildResponse({"code": 601, "msg": config.errors[601]}));
        }
        else {
            return cb(BL);
        }
    });
}
function initBLModel(req, res, cb) {
    let modelName = config.model;
    if (req.soajs.servicesConfig && req.soajs.servicesConfig.model) {
        modelName = req.soajs.servicesConfig.model;
    }
    if (process.env.SOAJS_TEST && req.soajs.inputmaskData.model) {
        modelName = req.soajs.inputmaskData.model;
    }
    BLModule.init(modelName, function (error, BL) {
        if (error) {
            req.soajs.log.error(error);
            return res.json(req.soajs.buildResponse({"code": 601, "msg": config.errors[601]}));
        }
        else {
            return cb(BL);
        }
    });
}
function initBLModel ( req , res , cb ) { let modelName = config . model ; if ( req . soajs . servicesConfig && req . soajs . servicesConfig . model ) { modelName = req . soajs . servicesConfig . model ; } if ( process . env . SOAJS_TEST && req . soajs . inputmaskData . model ) { modelName = req . soajs . inputmaskData . model ; } BLModule . init ( modelName , function ( error , BL ) { if ( error ) { req . soajs . log . error ( error ) ; return res . json ( req . soajs . buildResponse ( { "code" : 601 , "msg" : config . errors [ 601 ] } ) ) ; } else { return cb ( BL ) ; } } ) ; }
Initialize the Business Logic model
Initialize the Business Logic model