You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This server-side API class allows extending Engine Management functionality.


getAllEngines()


This method gets all engines.


Return:

TypeDescription
ArrayThe engines list as a string array.


Example:

getAllEngines
ss.importIncludeScript('SimpleEngine'); 
ss.info(SimpleEngine.getAllEngines());

getEngineOption(optionName)


This method returns the engine option by the name specified.

Parameter(s):

NameTypeMandatoryDefault Value
optionNameStringYN


Return:

TypeDescription
SimpleEngine objectThe object containing engine option.


Example:

getEngineOption
ss.importIncludeScript('SimpleEngine'); 
const engine = new SimpleEngine('Following Engine')
ss.info(engine.getEngineOption('Active'))

getOptionValueForTable(optionName, tableName)


This method gets engine option values for the table specified.


Parameter(s):

NameTypeMandatoryDefault Value
optionNameStringYN
tableNameStringYN


Return:

TypeDescription
StringThe engine option value for the table specified.


Example:

getOptionValueForTable
ss.importIncludeScript('SimpleEngine'); 
const engine = new SimpleEngine('Following Engine')
ss.info(engine.getOptionValueForTable('Active', 'itsm_inquiry')) // TRUE

isEngineEnable(tableName)


This method checks if the engine enabled for the table specified.

Parameter(s):

NameTypeMandatoryDefault Value
tableNameStringYN


Return:

TypeDescription
BooleanIf an engine is enabled for the table specified then the method returns TRUE; otherwise, it returns FALSE.


Example:

isEngineEnable
ss.importIncludeScript('SimpleEngine'); 
const engine = new SimpleEngine('Following Engine')
if (engine.isEngineEnable('itsm_inquiry')) {
  ss.info('Following Engine enabled on itsm_inquiry');
} else {
  ss.info('Following Engine disabled on itsm_inquiry');
}

  • No labels