Skip to content
Snippets Groups Projects
Commit ae8e1403 authored by jurgenhaas's avatar jurgenhaas
Browse files

Update all models to remove uuid and _core and also add the link to recipes

parent bdbf3e12
No related branches found
No related tags found
1 merge request!103Merging develop into main
Pipeline #1240832 passed
Showing
with 91 additions and 28 deletions
......@@ -16,6 +16,13 @@ Version v1
<script>url='bpmn_io-eca_lib_0028.xml';archive='bpmn_io-eca_lib_0028.tar.gz'</script>
{!include/library/viewer.html!}
Instead of downloading the archive, you can download and apply this model as a recipe (Drupal 10.3 or later):
```shell
composer require drupal-eca-recipe/access_to_form_fields_with_tokens
cd web && php core/scripts/drupal recipe ../vendor/drupal-eca-recipe/access_to_form_fields_with_tokens
```
## Purpose
This model demonstrates how to access form field values during validation or submission, how to find out the proper token syntax for each form field type, and also an alternative approach by building a temporary entity from form field values to use the more transparent entity token syntax.
......
No preview for this file type
......@@ -15,6 +15,13 @@ Version v1
<script>url='bpmn_io-eca_lib_0009.xml';archive='bpmn_io-eca_lib_0009.tar.gz'</script>
{!include/library/viewer.html!}
Instead of downloading the archive, you can download and apply this model as a recipe (Drupal 10.3 or later):
```shell
composer require drupal-eca-recipe/content_validation
cd web && php core/scripts/drupal recipe ../vendor/drupal-eca-recipe/content_validation
```
## Purpose
This example model changes the behaviour when editing a content of type &quot;article&quot; in a form:
......
No preview for this file type
No preview for this file type
......@@ -17,11 +17,18 @@ Version v1
<script>url='bpmn_io-eca_lib_0016.xml';archive='bpmn_io-eca_lib_0016.tar.gz'</script>
{!include/library/viewer.html!}
Instead of downloading the archive, you can download and apply this model as a recipe (Drupal 10.3 or later):
```shell
composer require drupal-eca-recipe/asynchronous_views_export
cd web && php core/scripts/drupal recipe ../vendor/drupal-eca-recipe/asynchronous_views_export
```
## Purpose
This model provides an endpoint `/eca/export/users` which can be published as a menu item or a link. When requested, it does this:
- Check access and only allow users with the administrator role to cal that endpoint
- Check access and only allow users with the administror role to cal that endpoint
- Enqueue a task called `export-users` and forward the email address of the current user
- Display a message to the user and redirect them back to the page where they came from
......
No preview for this file type
......@@ -15,6 +15,13 @@ Version v1
<script>url='bpmn_io-eca_lib_0020.xml';archive='bpmn_io-eca_lib_0020.tar.gz'</script>
{!include/library/viewer.html!}
Instead of downloading the archive, you can download and apply this model as a recipe (Drupal 10.3 or later):
```shell
composer require drupal-eca-recipe/auto_create_entity_with_values_from_another_one_and_the_current_user
cd web && php core/scripts/drupal recipe ../vendor/drupal-eca-recipe/auto_create_entity_with_values_from_another_one_and_the_current_user
```
## Purpose
This model reacts upon creating a new page node. It then creates a new article node, its title is populated with the page auther&#039;s name, some static text and the title of the created page.
......
......@@ -17,6 +17,13 @@ Version v1
<script>url='bpmn_io-eca_lib_0022.xml';archive='bpmn_io-eca_lib_0022.tar.gz'</script>
{!include/library/viewer.html!}
Instead of downloading the archive, you can download and apply this model as a recipe (Drupal 10.3 or later):
```shell
composer require drupal-eca-recipe/calculated_entity_field
cd web && php core/scripts/drupal recipe ../vendor/drupal-eca-recipe/calculated_entity_field
```
## Purpose
This model calculates a field value and stores it with a node, each time that node gets either created or updated. This shows in a simple example, how the contrib module &quot;Calculated Field&quot; can be replaced with ECA models.
......
No preview for this file type
......@@ -14,6 +14,13 @@ Version v1
<script>url='bpmn_io-eca_lib_0002.xml';archive='bpmn_io-eca_lib_0002.tar.gz'</script>
{!include/library/viewer.html!}
Instead of downloading the archive, you can download and apply this model as a recipe (Drupal 10.3 or later):
```shell
composer require drupal-eca-recipe/combined_conditions
cd web && php core/scripts/drupal recipe ../vendor/drupal-eca-recipe/combined_conditions
```
## Purpose
This means:
......
No preview for this file type
......@@ -14,6 +14,13 @@ Version v1
<script>url='bpmn_io-eca_lib_0012.xml';archive='bpmn_io-eca_lib_0012.tar.gz'</script>
{!include/library/viewer.html!}
Instead of downloading the archive, you can download and apply this model as a recipe (Drupal 10.3 or later):
```shell
composer require drupal-eca-recipe/count_user_logins
cd web && php core/scripts/drupal recipe ../vendor/drupal-eca-recipe/count_user_logins
```
## Purpose
This model adds a number field to the user entity with a default value 0. It then increments that value, each time that user logs into the site.
......
No preview for this file type
......@@ -16,6 +16,13 @@ Version v1
<script>url='bpmn_io-eca_lib_0030.xml';archive='bpmn_io-eca_lib_0030.tar.gz'</script>
{!include/library/viewer.html!}
Instead of downloading the archive, you can download and apply this model as a recipe (Drupal 10.3 or later):
```shell
composer require drupal-eca-recipe/create_user_entity_from_json
cd web && php core/scripts/drupal recipe ../vendor/drupal-eca-recipe/create_user_entity_from_json
```
## Purpose
This model demonstrates how to create a content entity with data from a JSON string. It also shows why creating a user entity &quot;the classic way&quot; doesn&#039;t work, more about the reasons for that are explained in the video.
......@@ -47,7 +54,6 @@ The creation of this module was recorded and the video with additional explanati
- [Save the user](/plugins/eca/content/actions/eca_save_entity.md)
- [Success message](/plugins/core/actions/action_message_action.md)
- [Switch to user 1](/plugins/eca/user/actions/eca_switch_account.md)
- [Switch to user 1](/plugins/eca/user/actions/eca_switch_account.md)
- [Unserialize json for user](/plugins/eca/render/actions/eca_render_unserialize_serialization.md)
- [Save user](/plugins/eca/content/actions/eca_save_entity.md)
- [Success Message](/plugins/core/actions/action_message_action.md)
......
No preview for this file type
......@@ -16,6 +16,13 @@ Version v2
<script>url='bpmn_io-eca_lib_0010.xml';archive='bpmn_io-eca_lib_0010.tar.gz'</script>
{!include/library/viewer.html!}
Instead of downloading the archive, you can download and apply this model as a recipe (Drupal 10.3 or later):
```shell
composer require drupal-eca-recipe/detect_user_role_changes
cd web && php core/scripts/drupal recipe ../vendor/drupal-eca-recipe/detect_user_role_changes
```
## Purpose
When a user entity gets saved, this model compares the list of original and current roles of that user and finds out, which ones got added and which ones got removed.
......@@ -39,9 +46,6 @@ For each missing role, this model shows a message on screen.
### Conditions
- [Compare number of list items](/plugins/eca/base/conditions/eca_count.md)
- [Compare two scalar values](/plugins/eca/base/conditions/eca_scalar.md)
- [Compare two scalar values](/plugins/eca/base/conditions/eca_scalar.md)
- [Compare number of list items](/plugins/eca/base/conditions/eca_count.md)
- [Compare two scalar values](/plugins/eca/base/conditions/eca_scalar.md)
......@@ -52,7 +56,6 @@ For each missing role, this model shows a message on screen.
- [Message that the role is new](/plugins/core/actions/action_message_action.md)
- [Join original IDs](/plugins/eca/base/actions/eca_token_set_value.md)
- [Join current IDs](/plugins/eca/base/actions/eca_token_set_value.md)
- [Get next role](/plugins/eca/base/actions/eca_list_remove.md)
- [Message that role has been removed](/plugins/eca/base/actions/eca_warning_message.md)
- [Get the list of original roles](/plugins/eca/content/actions/eca_get_field_value.md)
- [Get the list of current roles](/plugins/eca/content/actions/eca_get_field_value.md)
......
No preview for this file type
......@@ -15,6 +15,13 @@ Version v1
<script>url='bpmn_io-eca_lib_0015.xml';archive='bpmn_io-eca_lib_0015.tar.gz'</script>
{!include/library/viewer.html!}
Instead of downloading the archive, you can download and apply this model as a recipe (Drupal 10.3 or later):
```shell
composer require drupal-eca-recipe/display_message_to_specific_user_roles_only
cd web && php core/scripts/drupal recipe ../vendor/drupal-eca-recipe/display_message_to_specific_user_roles_only
```
## Purpose
This model prints a message on screen, when the user opens the user profile form for editing. The message output is limited to users that have one of the roles editor, customer or auditor.
......@@ -33,8 +40,6 @@ This model prints a message on screen, when the user opens the user profile form
### Conditions
- [Role of current user](/plugins/eca/user/conditions/eca_current_user_role.md)
- [Role of current user](/plugins/eca/user/conditions/eca_current_user_role.md)
- [Role of current user](/plugins/eca/user/conditions/eca_current_user_role.md)
### Actions
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment