Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
This server-side API class allows extending Engine Management functionality.
getAllEngines()
This method gets all engines in a list.
Return:
Type | Description |
---|---|
Array | A list of engines as a string array. |
Example:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
ss.importIncludeScript('SimpleEngine'); ss.info(SimpleEngine.getAllEngines()); |
getEngineOption(optionName)
This method returns the engine option by the name specified.
Parameter(s):
Name | Type | Mandatory | Default Valuevalue |
---|---|---|---|
optionName | String | Y | N |
Return:
Type | Description |
---|---|
SimpleEngine object | The object containing the engine option. |
Example:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
ss.importIncludeScript('SimpleEngine'); const engine = new SimpleEngine('Following Engine') ss.info(engine.getEngineOption('Active')) |
getOptionValueForTable(optionName, tableName)
This method gets the engine option values for the table specified.
Parameter(s):
Name | Type | Mandatory | Default Valuevalue |
---|---|---|---|
optionName | String | Y | N |
tableName | String | Y | N |
Return:
Type | Description |
---|---|
String | The engine option value for the table specified. |
Example:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
ss.importIncludeScript('SimpleEngine'); const engine = new SimpleEngine('Following Engine') ss.info(engine.getOptionValueForTable('Active', 'itsm_inquiry')) // TRUE |
isEngineEnable(tableName)
This method verifies if the engine is enabled for the table specified.
Parameter(s):
Name | Type | Mandatory | Default Valuevalue |
---|---|---|---|
tableName | String | Y | N |
Return:
Type | Description |
---|---|
Boolean | If an engine is enabled for the table is specified, the method returns true: otherwise, it returns false'. |
Example:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
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'); } |
Table of Contents | ||||
---|---|---|---|---|
|