healthcheck(callback) {
        this.getRecord((result, error) => {
        /**
            * For this lab, complete the if else conditional
            * statements that check if an error exists
            * or the instance was hibernating. You must write
            * the blocks for each branch.
            */
            if (error) {
                //log.error(error);
                log.info("ServiceNow Adapter: OFFLINE");
                this.emitOffline();
                if(callback){
                    callback(error);
                }   
            } else {
                //log.info(result);
                log.info("ServiceNow Adapter: ONLINE");
                this.emitOnline();
                if(callback){
                    callback(result);
                }
            }
        });
    }
/**
 * @memberof ServiceNowAdapter
 * @method healthcheck
 * @summary Check ServiceNow Health
 * @description Verifies external system is available and healthy.
 *   Calls method emitOnline if external system is available.
 *
 * @param {ServiceNowAdapter~requestCallback} [callback] - The optional callback
 *   that handles the response.
 */
@memberof ServiceNowAdapter
@method healthcheck
@summary Check ServiceNow Health
@description Verifies external system is available and healthy.
Calls method emitOnline if external system is available.

@param {ServiceNowAdapter~requestCallback} [callback] - The optional callback
that handles the response.
@memberof ServiceNowAdapter @method healthcheck @summary Check ServiceNow Health @description Verifies external system is available and healthy . Calls method emitOnline if external system is available . @param { ServiceNowAdapter~requestCallback } [ callback ] - The optional callback that handles the response .
healthcheck(callback) {
        this.getRecord((result, error) => {
            if (error) {
                log.info("ServiceNow Adapter: OFFLINE");
                this.emitOffline();
                if(callback){
                    callback(error);
                }   
            } else {
                log.info("ServiceNow Adapter: ONLINE");
                this.emitOnline();
                if(callback){
                    callback(result);
                }
            }
        });
    }
healthcheck ( callback ) { this . getRecord ( ( result , error ) => { if ( error ) { log . info ( "ServiceNow Adapter: OFFLINE" ) ; this . emitOffline ( ) ; if ( callback ) { callback ( error ) ; } } else { log . info ( "ServiceNow Adapter: ONLINE" ) ; this . emitOnline ( ) ; if ( callback ) { callback ( result ) ; } } } ) ; }
@memberof ServiceNowAdapter
 @method healthcheck
 @summary Check ServiceNow Health
 @description Verifies external system is available and healthy.
@memberof ServiceNowAdapter @method healthcheck @summary Check ServiceNow Health @description Verifies external system is available and healthy .
/**
            * For this lab, complete the if else conditional
            * statements that check if an error exists
            * or the instance was hibernating. You must write
            * the blocks for each branch.
            */ //log.error(error);
 //log.info(result);
