ScenarioExecutionStatus
Example
// Retrieving an ExecutionStatus from a scenario. var statusPromise = scenario.getCurrentExecutionStatus(); statusPromise .then( function (status) { // status available here });
Method summary
name | description |
---|---|
getExecutionTime | The amount of time this job has been executing. |
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. |
Constructor
Snapshot of the current scenario's execution status.
Parameters:
Name | Type | Description |
---|---|---|
scenarioId | the scenario associated with this execution status | |
data | execution status data |
Methods
- getExecutionTime ( ) → {number}
-
The amount of time this job has been executing.
detailsReturns:returns tableType Description typenumberthe amount of time this job has been executing Example
examples
Back to Topvar execTimeInMs = status.getExecutionTime();
- getGap ( ) → {number}
-
Returns the current relative gap for this job.
detailsReturns:returns tableType Description typenumberthe current relative gap for this job Example
examples
Back to Topvar gapNum = status.getGap();
- getJobId ( ) → {string}
-
The identifier of the job associated with this execution status.
detailsReturns:returns tableType Description typestringthe job identifier associated with this execution status Example
examples
Back to Topvar jobId = status.getJobId();
- getNumberOfSolutions ( ) → {number}
-
Returns the current number of solutions for this job.
detailsReturns:returns tableType Description typenumberthe current number of solutions for this job Example
examples
Back to Topvar numSolutions = status.getNumberOfSolutions();
- getObjective ( ) → {number}
-
Returns the current objective value for this job.
detailsReturns:returns tableType Description typenumberthe current objective value for this job Example
examples
Back to Topvar num = status.getObjective();
- getScenarioId ( ) → {string}
-
The identifier of the scenario associated with this execution status.
detailsReturns:returns tableType Description typestringthe scenario identifier associated with this execution status Example
examples
Back to Topvar scenId = status.getScenarioId();
- getStatus ( ) → {insight.enums.ScenarioExecutionStatus}
-
Return the job state code.
detailsReturns:returns tableType Description typeinsight.enums.ScenarioExecutionStatusthe job state code Example
examples
Back to Topif ( status.getStatus() === insight.enums.ScenarioExecutionStatus.EXECUTING ) { // do something if scenario is executing }
- isExecuting ( ) → {boolean}
-
Returns true if this job is executing.
detailsReturns:returns tableType Description typebooleantrue if this job is executing, otherwise false Example
examples
Back to Topif ( status.isExecuting() ) { // run if scenario is currently executing. }
- isQueued ( ) → {boolean}
-
Returns true if this job is queued for execution.
detailsReturns:returns tableType Description typebooleantrue if this job is queued for execution, otherwise false Example
examples
Back to Topif ( status.isqQueued() ) { // run if scenario is currently queued for execution. }
© 2001-2019 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.