Skip to content

scenario class

Displays and modify the definition of a scenario.

Methods

__init__()

__init__(
    scenario=None,
    active=True,
    expandable=True,
    expanded=True,
    show_submit=True,
    show_delete=True,
    show_config=False,
    show_creation_date=False,
    show_cycle=False,
    show_tags=True,
    show_properties=True,
    show_sequences=True,
    show_submit_sequences=True,
    on_submission_change=None,
    id=None,
    class_name=None,
) -> None

Create a new scenario element.

Parameters:

Name Type Description Default
scenario dynamic(Union[Scenario, list[Scenario]])

The scenario to display and edit.
If the value is a list, it must have a single element otherwise nothing is shown.

None
active dynamic(bool)

Indicates if this component is active.
An inactive component allows no user interaction.

True
expandable bool

If True, the scenario viewer can be expanded.
If False, the scenario viewer is not expandable and it is shown depending on expanded value.

True
expanded bool

If True, when a valid scenario is selected, the scenario viewer is expanded and its content is displayed.
If False, the scenario viewer is collapsed and only its name and submit button are visible.

True
show_submit bool

If False, the scenario submit button is not visible.

True
show_delete bool

If False, the button to delete a scenario is not visible.

True
show_config bool

If False, the scenario configuration label is not visible.

False
show_creation_date bool

If False, the scenario creation date is not visible.

False
show_cycle bool

If False, the scenario cycle label is not visible.

False
show_tags bool

If False, the scenario tags are not visible.

True
show_properties bool

If False, the scenario properties are not visible.

True
show_sequences bool

If False, the scenario sequences are not visible.

True
show_submit_sequences bool

If False, the buttons to submit scenario sequences are not visible.

True
on_submission_change Union[str, Callable]

A function or the name of a function that is triggered when a submission status is changed.

All the parameters of that function are optional:

  • state (State): the state instance.
  • submission (Submission): the submission entity containing submission information.
  • details (dict): the details on this callback's invocation.
    This dictionary has the following keys:
    • submission_status (str): the new status of the submission (possible values are: "SUBMITTED", "COMPLETED", "CANCELED", "FAILED", "BLOCKED", "WAITING", or "RUNNING").
    • job: the Job (if any) that is at the origin of the submission status change.
    • submittable_entity (Submittable): the entity (usually a Scenario) that was submitted.
None
id str

The identifier that will be assigned to the rendered HTML component.

None
class_name dynamic(str)

The list of CSS class names associated with the generated HTML Element.
These class names will be added to the default taipy_gui_core-[element_type].

None