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).
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).