Skip to main content
Version: 1.20.1

SimpleEngine

This server-side API class provides methods to extend the Engine Management functionality.

getAllEngines()


Use this method to get all engines in a list.

Return:

TypeDescription
Array of StringsThis method returns a list of engines as a string array.

Example:

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

getEngineOption(optionName)


Use this method to return the engine option by the specified name.

Parameter(s):

NameTypeMandatoryDefault value
optionNameStringYN

Return:

TypeDescription
SimpleEngine objectThis method returns the object that contains the engine option.

Example:

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

getOptionValueForTable(optionName, tableName)


Use this method to get the engine option values for the specified table.

Parameter(s):

NameTypeMandatoryDefault value
optionNameStringYN
tableNameStringYN

Return:

TypeDescription
StringThis method returns the engine option value for the specified table.

Example:

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

isEngineEnable(tableName)


Use this method to verify if the engine is enabled for the specified table.

Parameter(s):

NameTypeMandatoryDefault value
tableNameStringYN

Return:

TypeDescription
BooleanIf an engine is enabled for the specified table, 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');
}