diff --git a/docs/eca/concepts/index.md b/docs/eca/concepts/index.md index 81f11d37e1bcfeefa4bbcceb8c17a1f8ace79a2a..19a40e09b213bf81e916a0bc2e9bc55423c632e1 100644 --- a/docs/eca/concepts/index.md +++ b/docs/eca/concepts/index.md @@ -1,6 +1,67 @@ --- -title: Concepts +title: ECA concepts --- -# Concepts -In this section you'll find basic ECA concepts that are important to understand when building models. +# Understanding ECA concepts + +ECA (Events - Conditions - Actions) models help you automate business processes in Drupal by responding to events that happen on your site. Think of ECA as a watchful assistant that can detect when something happens, check if certain conditions apply, and then take appropriate actions. + +## Core components + +### Events + +Events are triggers that start an ECA process. These could be things like: + +- A user logging in +- Content being created or updated +- A form being submitted +- A scheduled time arriving +- A custom event you define + +When an event occurs, ECA checks if any models are listening for that event and runs them if so. + +### Conditions + +Conditions are checks that determine whether actions should run. They act as filters or guards, ensuring actions only happen when appropriate. For example, you might want to: + +- Check if a user has a specific role +- Verify content has certain field values +- Ensure a threshold has been met +- Compare dates or times +- Combine multiple conditions with AND/OR logic + +### Actions + +Actions are the tasks ECA performs when an event occurs and conditions are met. Actions can: + +- Create or update content +- Send notifications +- Modify user accounts +- Interact with external systems +- Trigger other events +- Perform custom operations + +## How components work together + +Let's look at a common example: sending a welcome email to new users in a specific role. + +1. **Event**: User account is created +2. **Condition**: User has the "member" role +3. **Action**: Send customized welcome email + +ECA processes this flow by: + +1. Detecting the account creation event +2. Checking the user's roles +3. Sending the email if the condition is met + +## Next steps + +Learn more about specific concepts: + +- [Working with custom events](custom_events.md) +- [Understanding tokens](tokens.md) +- [Using loops](loops.md) +- [Managing permissions](permissions.md) + +For practical examples, visit our [model library](../../library/index.md). diff --git a/docs/index.md b/docs/index.md index d6df4836d1cc794574794fb233c47a94ee5a61db..80137073a8b7331b0f349c290186b2dd284a4d7f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -3,59 +3,57 @@ title: Drupal ECA Documentation --- # Welcome to Drupal ECA -ECA stands for **Events - Conditions - Actions**. +This document explains how to use the Events - Conditions - Actions (ECA) module for Drupal. -It's a [Drupal](https://www.drupal.org) module and has its own [project page](https://www.drupal.org/project/eca). This -**ECA Guide** is provided by the ECA maintainers, you can contact them on their user profile on drupal.org or in the -[ECA Slack Channel](https://drupal.slack.com/archives/C0287U62CSG). +## What is ECA? -## The 5 sections of this guide +ECA (Events - Conditions - Actions) is a Drupal module that processes business process models based on Drupal events. The module integrates with Drupal core components and provides plugin management for: -### ECA +* [Events](eca/concepts/index.md#events) +* [Conditions](eca/concepts/index.md#conditions) +* [Actions](eca/concepts/index.md#actions) -[All about the ECA](/index.md) module, [how to install](eca/install.md) it, [important concepts](eca/concepts/index.md) to understand -how ECA works and instructions on [how to extend ECA](eca/extend/index.md). +!!! note -Important building blocks of ECA are the plugins for events, conditions and actions. Those are contained in their own -section for [plugins](#plugins) + ECA does not include a built-in user interface. Instead, it provides a modeller plugin manager that integrates with existing tools. If a modeller supports templates, ECA provides them for all plugins available on your Drupal site. -The ECA module is the heart of the module suite. Whenever a Drupal event -occurs, it processes any (business process) model defined for that event. +## Contents -ECA leverages existing components of Drupal core, i.e. events and actions, -and provides its own plugin manager for conditions. Hence all 3 components -(events, conditions, actions) are implemented as plugins and may be easily -extended by other modules. +* [Installation guide](eca/install.md) +* [Key concepts](eca/concepts/index.md) +* [Extension guide](eca/extend/index.md) +* [Plugin documentation](plugins/index.md) +* [Available modellers](modeller/index.md) +* [Example models](library/index.md) +* [Additional resources](#additional-resources) -!!! attention +## Additional resources - The ECA module does not provide any user interface to define models. Instead, - it provides a modeller plugin manager to easily integrate existing tools. - If a modeller supports templates for events, conditions and actions, - ECA will provide them for all the plugins that are available on a Drupal site. +You can find articles, tutorials, videos and other learning materials in the Resources section. -### Modellers +## Get support -[Modellers](modeller/index.md) are the UI for ECA. They are described in this chapter. +Contact the ECA maintainers through: -### Plugins +* Their Drupal.org user profiles +* The [ECA Slack channel](https://drupal.slack.com/archives/C0287U62CSG) -Each event, each condition and each action is available as a [plugin](plugins/index.md). This chapter contains documentation -for each of them and how they can be configured. +## Contribute -### Library +We welcome contributions including: -This is where you can find [example ECA models](library/index.md). +* Bug reports and feature requests +* Documentation improvements +* Example models +* Custom plugins +* General feedback -### Resources +To contribute: -Articles, blog posts, tutorials, videos and so much more - all learning resources in one place. +1. Create an account on [ECA Guide GitLab](https://gitlab.lakedrops.com) +2. Visit the [ECA Guide Project](https://gitlab.lakedrops.com/drupal/documentation/eca) +3. Open an issue or create a merge request -## How to contribute +This documentation uses British English. -Found a typo? Want to write some chapters for this guide? Have an example model you want to publish? Wrote your own ECA -plugins? Or you just want to provide feedback? This is all very welcome. To do so, please create an account in the -[ECA Guide GitLab](https://gitlab.lakedrops.com) and then go to the [ECA Guide Project](https://gitlab.lakedrops.com/drupal/documentation/eca) -where you can either open an issue or fork the project and then create a merge request. - -We use British English in this guide. +For more information about ECA, visit the [project page](https://www.drupal.org/project/eca).