Initializing help system before first use

xpressinsight.scenario.InsightRestClient.execute_scenario

Purpose
Execute the scenario, optionally waiting for the job to complete.
Synopsis
xpressinsight.scenario.InsightRestClient.execute_scenario(self, scenario_id: str, execution_mode: str = 'RUN', wait_time: Optional[datetime.timedelta] = None) -> None
Arguments
scenario_id 
The ID of the scenario to execute.
execution_mode 
The name of the execution mode to execute. Defaults to 'RUN' if unset.
wait_time 
Amount of time to wait for scenario to complete. If not specified, the function returns immediately.
Return value

This function may raise the following errors:

  scenario.ScenarioTimeOutError

If the Insight scenario execution did not complete within the given wait time.

  scenario.InsightServerError

If the REST client credentials do not have permission to perform this operation, or there is an issue communicating with the Insight server.

Example
Execute the scenario and wait up to 30 minutes for it to complete.
>>> with ins.InsightRestClient(insight_url='http://localhost:8080/') as client:
...     client.execute_scenario('570b9100-46e3-4643-baee-2e24aa538f25',
...                             wait_time=timedelta(minutes=30))			
Further information
1. If a wait time is specified, the function blocks waiting for the scenaio and raises a ScenarioTimeOutError if the scenario execution does not finish within the specified time. Note the job is not automatically cancelled, so you must call scenario.InsightRestClient.cancel_job if you need to do this.
2. If a wait_time value is not specified, the function returns immediately after the job is accepted by the Insight server.
3. This function does not check whether any errors were encountered during the execution of the scenario.
Related topics

© 2001-2024 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.