diff --git a/docs/userman/scenario_features/sdm/events/code-example/create-and-start-core-event-consumer.py b/docs/userman/scenario_features/events/code-example/create-and-start-core-event-consumer.py similarity index 100% rename from docs/userman/scenario_features/sdm/events/code-example/create-and-start-core-event-consumer.py rename to docs/userman/scenario_features/events/code-example/create-and-start-core-event-consumer.py diff --git a/docs/userman/scenario_features/sdm/events/code-example/external-api-call-notifier.py b/docs/userman/scenario_features/events/code-example/external-api-call-notifier.py similarity index 100% rename from docs/userman/scenario_features/sdm/events/code-example/external-api-call-notifier.py rename to docs/userman/scenario_features/events/code-example/external-api-call-notifier.py diff --git a/docs/userman/scenario_features/sdm/events/code-example/register-specific-topic-to-notifier.py b/docs/userman/scenario_features/events/code-example/register-specific-topic-to-notifier.py similarity index 100% rename from docs/userman/scenario_features/sdm/events/code-example/register-specific-topic-to-notifier.py rename to docs/userman/scenario_features/events/code-example/register-specific-topic-to-notifier.py diff --git a/docs/userman/scenario_features/sdm/events/code-example/user-changes-notifier.py b/docs/userman/scenario_features/events/code-example/user-changes-notifier.py similarity index 100% rename from docs/userman/scenario_features/sdm/events/code-example/user-changes-notifier.py rename to docs/userman/scenario_features/events/code-example/user-changes-notifier.py diff --git a/docs/userman/scenario_features/sdm/events/events-description.md b/docs/userman/scenario_features/events/events-description.md similarity index 100% rename from docs/userman/scenario_features/sdm/events/events-description.md rename to docs/userman/scenario_features/events/events-description.md diff --git a/docs/userman/scenario_features/events/examples.md b/docs/userman/scenario_features/events/examples.md new file mode 100644 index 000000000..39a53ca86 --- /dev/null +++ b/docs/userman/scenario_features/events/examples.md @@ -0,0 +1,38 @@ +Examples of using Taipy event notifications to capture and consume *events*. + +# Real-Time GUI Updates with Taipy Event Consumers + +This script defines a custom event consumer class `SpecificCoreConsumer`, which listens +for all events published by Taipy Core and triggers GUI notification based on those events. +It includes determining if the event is published from a `Scenario^` entity or `DataNode^` entity +and if the action is `CREATION` or `UPDATE`. + + +```python linenums="1" +{% +include-markdown "./code-example/user-changes-notifier.py" +comments=false + %} +``` + +This snippet shows a how you can capture and process events to notify user whenever +a new scenario is created or the value of a data node is updated. +For more details, see the [registration](understanding-notifier-register.md) page. + +# External API triggered with Taipy Event Consumers + +This script defines a custom event consumer class `JobFailureCoreConsumer`, which listens +for all events published by Taipy Core, when a `JOB` entity's `status` attribute is `UPDATE`, +and triggers an external API call based on the `JOB`'s `id`. + + +```python linenums="1" +{% +include-markdown "./code-example/external-api-call-notifier.py" +comments=false + %} +``` + +This snippet shows a how you can capture and process `JOB` events when an `UPDATE` is made to the `status` +of the `JOB` and request an external API. +For more details, see the [registration](understanding-notifier-register.md) page. diff --git a/docs/userman/scenario_features/sdm/events/index.md b/docs/userman/scenario_features/events/index.md similarity index 100% rename from docs/userman/scenario_features/sdm/events/index.md rename to docs/userman/scenario_features/events/index.md diff --git a/docs/userman/scenario_features/sdm/events/understanding-notifier-register.md b/docs/userman/scenario_features/events/understanding-notifier-register.md similarity index 100% rename from docs/userman/scenario_features/sdm/events/understanding-notifier-register.md rename to docs/userman/scenario_features/events/understanding-notifier-register.md diff --git a/docs/userman/scenario_features/sdm/events/examples.md b/docs/userman/scenario_features/sdm/events/examples.md deleted file mode 100644 index 7e0dd48f1..000000000 --- a/docs/userman/scenario_features/sdm/events/examples.md +++ /dev/null @@ -1,38 +0,0 @@ -Examples of using Taipy event notifications to capture and consume *events*. - -# Real-Time GUI Updates with Taipy Event Consumers - -This script defines a custom event consumer class `SpecificCoreConsumer`, which listens -for all events published by Taipy Core and triggers GUI notification based on those events. -It includes determining if the event is published from a `Scenario^` entity or `DataNode^` entity -and if the action is `CREATION^` or `UPDATE^`. - -!!! example - ```python linenums="1" - {% - include-markdown "./code-example/user-changes-notifier.py" - comments=false - %} - ``` - - This snippet shows a how you can capture and process events to notify user whenever - a new scenario is created or the value of a data node is updated. - For more details, see the [registration](understanding-notifier-register.md) page. - -# External API triggered with Taipy Event Consumers - -This script defines a custom event consumer class `JobFailureCoreConsumer`, which listens -for all events published by Taipy Core, when a `JOB^` entity's `status` attribute is `UPDATE`, -and triggers an external API call based on the `JOB^`'s `id`. - -!!! example - ```python linenums="1" - {% - include-markdown "./code-example/external-api-call-notifier.py" - comments=false - %} - ``` - - This snippet shows a how you can capture and process `JOB^` events when an `UPDATE` is made to the `status` - of the `JOB^` and request an external API. - For more details, see the [registration](understanding-notifier-register.md) page. diff --git a/mkdocs.yml_template b/mkdocs.yml_template index d646b4d5a..a5f2a4a36 100644 --- a/mkdocs.yml_template +++ b/mkdocs.yml_template @@ -98,7 +98,6 @@ nav: - "Data node usage": userman/scenario_features/data-integration/data-node-usage.md - "Visual elements": userman/scenario_features/data-integration/data-node-vizelmts.md - "Data node history and validity": userman/scenario_features/data-integration/data-node-history.md - - "Data Nodes cheatsheet": tutorials/articles/the_data_nodes/index.md - "Task orchestration": - "Scenarios for task orchestration": userman/scenario_features/task-orchestration/index.md @@ -113,7 +112,6 @@ nav: - "Multiple scenarios": userman/scenario_features/what-if-analysis/multiple-scenarios.md - "Recurrent scenarios": userman/scenario_features/what-if-analysis/scenarios-and-cycles.md - "Scenario comparison": userman/scenario_features/what-if-analysis/scenario-comparison.md - - "Scenario comparison cheatsheet": tutorials/articles/scenario_comparison/index.md - "Scenario and data management": @@ -125,9 +123,6 @@ nav: - "Scenario": - "Scenario": userman/scenario_features/sdm/scenario/index.md - "Scenario config": userman/scenario_features/sdm/scenario/scenario-config.md - - "Scenarios Cheatsheet": tutorials/articles/scenarios/index.md - - "Scenario Subscription Cheatsheet": tutorials/articles/scenario_subscription/index.md - - "Submission": - "Submission": userman/scenario_features/sdm/submission/index.md - "Job": @@ -136,10 +131,11 @@ nav: - "Sequence": userman/scenario_features/sdm/sequence/index.md - "Cycle": - "Cycle": userman/scenario_features/sdm/cycle/index.md - - "Cycles and Scopes": tutorials/articles/cycles_scopes/index.md - - "Event": - - "Event": userman/scenario_features/sdm/events/index.md - + - "Track activities and Trigger actions": + - "Event": userman/scenario_features/events/index.md + - "Event description": userman/scenario_features/events/events-description.md + - "Event subscription": userman/scenario_features/events/understanding-notifier-register.md + - "Examples": userman/scenario_features/events/examples.md - "Advanced features": - "Configuration":