ScenarioProperties
Method summary
name | description |
---|---|
cancel | Cancel any execution of this scenario. |
execute | Submits this scenario for execution. |
getAppId | The ID of the app this scenario belongs to. |
getCreationDate | The date this scenario was created. |
getId | The ID for this scenario. |
getModelSchema | The model's schema for this scenario. |
getName | The name of this scenario. |
getNotes | The notes associated with this scenario. |
getOwnerId | The username of the user that owns this scenario. |
getPath | The path to this scenario in the Insight Repository. |
getScenarioType | The type of this scenario. |
getShareStatus | The share status of this scenario. |
isEditable | Check whether the scenario data is currently in an editable state. When a scenario is reserved for execution (queued, executing, completing) the scenario data cannot be modified. |
setNotes | Set notes on this scenario. |
setOwnerId | Change the ownership of this scenario. |
Methods
- cancel ( ) → {Promise}
-
Cancel any execution of this scenario.
Returns:Type Description Promise promise, resolves when the scenario is successfully cancelled, or the scenario is not in the execution queue Example
Back to Topvar cancelledPromise = scenario.cancel(); cancelledPromise .then(function () { // at this point scneario has been cancelled. }) .catch(function (err) { // scenario failed to cancel });
- execute ( executionMode, options ) → {Promise}
-
Submits this scenario for execution, either to load the input data of a scenario, or to run it.
Parameters:
Name Type Argument Default Description executionMode string optional insight.enums.ExecutionType.RUN the mode of execution to perform options Object optional execution options Properties
Name Type Argument Description suppressClearPrompt boolean optional whether, on using an execution mode that clears input data, to suppress the confirmation prompt Returns:Type Description Promise promise, resolves when the scenario is successfully queued for execution Example
Back to Topvar runPromise = scenario.execute(insight.enums.ExecutionType.RUN, 'SLOW'); runPromise .then(function () { // scenario has been queued for execution }) .catch(function (err) { // scenario could not be executed. });
- getAppId ( ) → {string}
-
The ID of the app this scenario belongs to.
Returns:Type Description string The ID of the app this scenario belongs to Example
Back to Topvar appId = scenario.getAppId();
- getCreationDate ( ) → {Date}
-
The date this scenario was created.
Returns:Type Description Date The date this scenario was created Example
Back to Topvar creationDate = scenario.getCreationDate();
- getId ( ) → {string}
-
The ID for this scenario.
Returns:Type Description string The ID for this scenario Example
Back to Topvar scenId = scenario.getId();
- getModelSchema ( ) → {ModelSchema}
-
The model's schema for this scenario.
Returns:Type Description ModelSchema The model's schema for this scenario Example
Back to Topvar modelSchema = scenario.getModelSchema();
- getName ( ) → {string}
-
The name of this scenario.
Returns:Type Description string The name of this scenario Example
Back to Topvar name = scenario.getName();
- getNotes ( ) → {string}
-
The notes associated with this scenario.
Returns:Type Description string The notes associated with this scenario Example
Back to Topvar notesTxt = scenario.getNotes();
- getOwnerId ( ) → {string}
-
The username of the user that owns this scenario.
Returns:Type Description string The username of the user that owns this scenario Example
Back to Topvar username = scenario.getOwnerId();
- getPath ( ) → {string}
-
The path to this scenario in the Insight Repository.
Returns:Type Description string The path to this scenario in the Insight Repository Example
Back to Topvar pathString = scenario.getPath();
- getScenarioType ( ) → {insight.enums.ScenarioType}
-
The type of this scenario.
Returns:Type Description insight.enums.ScenarioType the type of this scenario Example
Back to Topif (scenario.getScenarioType() === insight.enums.ScenarioType.SCENARIO) { // do something if this scenario has type 'SCENARIO' }
-
The share status of this scenario.
Returns:Type Description insight.enums.ShareStatus The share status of this scenario Example
Back to Topif (scenario.getShareStatus() === insight.enums.ShareStatus.FULLACCESS) { // do something if share status is 'FULLACCESS' }
- isEditable ( ) → {boolean}
-
Check whether the scenario data is currently in an editable state. When a scenario is reserved for execution (queued, executing, completing) the scenario data cannot be modified.
Returns:Type Description boolean Whether the scenario data is currently editable Example
Back to Topif (scenario.isEditable()) { // modify scenario data }
- setNotes ( notes ) → {Promise}
-
Set notes on this scenario.
Parameters:
Name Type Description notes string Notes to set against the scenario Returns:Type Description Promise Promise object Example
Back to Topscenario .setNotes('A short note about this scenario') .then(function () { // notes have been set. }) .catch(function () { // notes could not be set. });
- setOwnerId ( newOwnerId ) → {Promise}
-
Change the ownership of this scenario.
Parameters:
Name Type Description newOwnerId string the username of the new owner for this scenario Returns:Type Description Promise Promise object Example
Back to Topscenario .setOwnerId('userid') .then(function () { // ownership has changed. }) .catch(function (err) { // ownership could not be changed. });
© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.