Skip to content

Commit

Permalink
Change events place in navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianJacta committed Sep 4, 2024
1 parent f33a1a9 commit 1130eff
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 47 deletions.
38 changes: 38 additions & 0 deletions docs/userman/scenario_features/events/examples.md
Original file line number Diff line number Diff line change
@@ -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.
38 changes: 0 additions & 38 deletions docs/userman/scenario_features/sdm/events/examples.md

This file was deleted.

14 changes: 5 additions & 9 deletions mkdocs.yml_template
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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":
Expand All @@ -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":
Expand All @@ -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":
Expand Down

0 comments on commit 1130eff

Please sign in to comment.