Menu
Introduction
Getting Started
Developer guide
Release
Architecture
CLI
Technical documentations
Version
Publication date

Mar 9, 2022

Confidentiality
Public
Reactions
2
Share

ScenarioService

Functions
archive_scenario_by_id @classmethod
clone_scenario @classmethod
count_by_title @classmethod
title : str
Return type : int
count_of_running_scenarios @classmethod
Return type : int
count_queued_scenarios @classmethod
Return type : int
count_running_or_queued_scenarios @classmethod
Return type : int
create_scenario @classmethod
create_scenario_from_dto @classmethod
create_scenario_from_protocol_model @classmethod
create_scenario_from_protocol_type @classmethod
protocol_type : type
folder : gws_core.folder.space_folder.SpaceFolder | None
title : str - ''
creation_type : ScenarioCreationType - ScenarioCreationType.MANUAL
Return type : Scenario
delete_intermediate_resources @classmethod
delete_scenario @classmethod
export_scenario @classmethod
scenario_id : str
Return type : ScenarioExportPackage
export_scenario_to_archive @classmethod

Export a scenario and its selected resources into a single tar archive.

scenario_id : str
ID of the scenario to export.
resource_mode : str - Inputs and outputs
Which resources to include (e.g. "Auto", "Inputs and outputs", "All").
Return type : str
get_by_id_and_check @classmethod
id_ : str
Return type : Scenario
get_intermediate_results @classmethod

Retrieve the list of intermediate resources of a scenario A resource is considered as intermediate if it is not used as output and not flagged

scenario_id : str
id of the scenario
Return type : list
get_next_scenarios_of_resource @classmethod

Return the list of scenario that used the resource as input

resource_id : str
_description_
page : int - 0
number_of_items_per_page : int - 20
Return type : Paginator
get_running_scenario_info @classmethod
scenario : Scenario
Return type : RunningScenarioInfoDTO
get_running_scenarios @classmethod
Return type : list
get_scenario_output_resource @classmethod

Return the output resource of a classic, single-output scenario.

This is meant for scenarios that expose exactly one output, like the ones built by ResourceTransfertService (an OutputTask connected to the produced resource). The output resource is retrieved through the ScenarioProxy / ProtocolProxy by looking up the protocol's OutputTask processes.

Returns None when the scenario is not successful (still running, in error, ...) or when it does not expose exactly one output resource.

id_ : str
the id of the scenario
Return type : gws_core.resource.resource_model.ResourceModel | None
reset_scenario @classmethod

Low-level reset of a scenario. This does not handle the impact chain (next scenarios/notes). Use EntityNavigatorService.reset_scenario instead.

scenario : Scenario
Return type : Scenario
search_by_title @classmethod
title : str
page : int - 0
number_of_items_per_page : int - 20
Return type : Paginator
synchronize_with_space_by_id @classmethod
id_ : str
Return type : Scenario
unarchive_scenario_by_id @classmethod
id_ : str
Return type : Scenario
update_scenario_description @classmethod
id_ : str
description : RichTextDTO
Return type : Scenario
update_scenario_folder @classmethod
scenario_id : str
folder_id : str | None
check_notes : bool - True
Return type : Scenario
update_scenario_title @classmethod
scenario_id : str
title : str
Return type : Scenario
validate_scenario @classmethod
validate_scenario_by_id @classmethod
Shine Logo
Technical bricks to reuse or customize

Have you developed a brick?

Share it to accelerate projects for the entire community.