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:
Type | Description |
---|---|
Array of Strings | This 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):
Name | Type | Mandatory | Default value |
---|---|---|---|
optionName | String | Y | N |
Return:
Type | Description |
---|---|
SimpleEngine object | This 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):
Name | Type | Mandatory | Default value |
---|---|---|---|
optionName | String | Y | N |
tableName | String | Y | N |
Return:
Type | Description |
---|---|
String | This 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):
Name | Type | Mandatory | Default value |
---|---|---|---|
tableName | String | Y | N |
Return:
Type | Description |
---|---|
Boolean | If 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');
}