ScenarioExecutionStatus
Example
insight.getView() .withFirstScenario() .withExecutionStatus() .notify(function (scenario) { // Retrieve the current ScenarioExecutionStatus from a Scenario. scenario.getExecutionStatus().getJobId(); });
Method summary
name | description |
---|---|
getExecutionDuration | The amount of time this job has been executing. |
getExecutionMode | The execution mode the current scenario execution is running. Or undefined if no execution status. |
getExecutionResourceGroup | The execution resource group the current scenario execution belongs to. Or undefined if no execution status. |
getGap | Returns the current relative gap for this job. |
getJobId | The identifier of the job associated with this execution status. |
getNumberOfSolutions | Returns the current number of solutions for this job. |
getObjective | Returns the current objective value for this job. |
getScenarioId | The identifier of the scenario associated with this execution status. |
getStatus | Return the job state code. |
isExecuting | Returns true if this job is executing. |
isQueued | Returns true if this job is queued for execution. |
Methods
- getExecutionDuration ( ) → {number}
-
The amount of time this job has been executing.
Returns:Type Description number the amount of time this job has been executing Example
Back to Topvar execTimeInMs = status.getExecutionDuration();
- getExecutionMode ( ) → {ExecutionMode|undefined}
-
The execution mode the current scenario execution is running. Or undefined if no execution status.
-
- See:
- ExecutionMode
Returns:Type Description ExecutionMode | undefined the execution mode object or undefined if there is no execution status -
- getExecutionResourceGroup ( ) → {ExecutionResourceGroup|undefined}
-
The execution resource group the current scenario execution belongs to. Or undefined if no execution status.
-
- See:
- ExecutionMode
Returns:Type Description ExecutionResourceGroup | undefined the execution resource group object or undefined if there is no execution status -
- getGap ( ) → {number}
-
Returns the current relative gap for this job.
Returns:Type Description number the current relative gap for this job Example
Back to Topvar gapNum = status.getGap();
- getJobId ( ) → {string}
-
The identifier of the job associated with this execution status.
Returns:Type Description string the job identifier associated with this execution status Example
Back to Topvar jobId = status.getJobId();
- getNumberOfSolutions ( ) → {number}
-
Returns the current number of solutions for this job.
Returns:Type Description number the current number of solutions for this job Example
Back to Topvar numSolutions = status.getNumberOfSolutions();
- getObjective ( ) → {number}
-
Returns the current objective value for this job.
Returns:Type Description number the current objective value for this job Example
Back to Topvar num = status.getObjective();
- getScenarioId ( ) → {string}
-
The identifier of the scenario associated with this execution status.
Returns:Type Description string the scenario identifier associated with this execution status Example
Back to Topvar scenId = status.getScenarioId();
- getStatus ( ) → {insight.enums.ScenarioExecutionStatus}
-
Return the job state code.
Returns:Type Description insight.enums.ScenarioExecutionStatus the job state code Example
Back to Topif ( status.getStatus() === insight.enums.ScenarioExecutionStatus.EXECUTING ) { // do something if scenario is executing }
- isExecuting ( ) → {boolean}
-
Returns true if this job is executing.
Returns:Type Description boolean true if this job is executing, otherwise false Example
Back to Topif ( status.isExecuting() ) { // run if scenario is currently executing. }
- isQueued ( ) → {boolean}
-
Returns true if this job is queued for execution.
Returns:Type Description boolean true if this job is queued for execution, otherwise false Example
Back to Topif ( status.isQueued() ) { // run if scenario is currently queued for execution. }
© 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.