fedms_eca¶
The fedms_eca module ships the ten ECA models that encode
FedMS' business logic. It does not contain much PHP — its value is in
its config (config/optional/eca.eca.*.yml) and in the conventions
those models embody.
GitLab¶
What it ships¶
Ten ECA models in config/optional/:
| Model | Heart of … | Reference page |
|---|---|---|
event_groups |
Event-group lifecycle reactions | event_groups |
group_blocks |
Group-context block rendering | group_blocks |
group_members |
Membership add/remove/re-activate | group_members |
group_operations |
Operations menu / VBO, group-context tokens | group_operations |
links |
Contextual link manipulation | links |
milestone_views |
Milestone taxonomy in Views | milestone_views |
session_groups |
Session-group lifecycle reactions | session_groups |
task_api |
Task spawning engine ⭐ | task_api |
users |
User automations | users |
views_fields |
Computed/derived fields for Views | views_fields |
For an overview and the model-editing workflow, see ECA models.
Module dependencies¶
A long list (fedms_eca.info.yml):
- All the
eca_*core sub-modules:eca_access,eca_base,eca_cache,eca_config,eca_content,eca_endpoint,eca_form,eca_language,eca_log,eca_misc,eca_queue,eca_render,eca_ui,eca_user,eca_views. - ECA contrib add-ons:
eca_entity_print,eca_group,eca_tamper,eca_vbo,eca_webform. easy_email— for the email actions used by the upcoming notification flows.entity_print:entity_print_views— view-based PDF export.fedms_task— the conditions and actions used bytask_api.group_action— VBO-style group actions.modeler:modelerandmodeler_api:modeler_api— the modeler framework.symfony_mailer_lite— outbound mail.token— token replacement.
Where the models are edited¶
Two paths:
- The modeler —
/admin/config/workflow/eca— interactive, visual editing. The current modeler isbpmn_io; a successor is coming. - Directly in YAML — discouraged. The modeler regenerates the
datahash and the node IDs; hand-edits get overwritten on the next save through the UI.
The model-editing workflow¶
- Read the per-model doc (this page links to each).
- Read the ECA guide for the events/conditions/actions vocabulary.
- Open
/admin/config/workflow/ecain the local dev environment on a clean install. - Make your changes in the modeler.
- Save the model.
- From the site root, run:
1 | |
cd web/modules/contrib/fedms_ecaand inspect the diff:
1 | |
- Commit and push, then open an MR.
Custom plugins¶
When an ECA-model change requires a new condition / action / event
plugin that doesn't exist yet, implement the plugin first in PHP
in the appropriate module (fedms_task, fedms_federation, etc.),
then reference it from the model.
Plugins live under src/Plugin/ECA/{Condition,Action,Event}/ per
module.
Don't hand-edit eca.eca.*.yml¶
The model YAML files contain a data: field with a SHA-256 hash
that the modeler maintains. Hand-edits desync the hash and can
silently break the model. Always go through the modeler and
re-export.
The exception is mechanical edits like search-and-replace of deprecated condition IDs — those are safe.
Mass-disabling models¶
If a model breaks the site, you can disable it without uninstalling:
1 2 | |
Or set $settings['eca_disable'] = TRUE; in settings.php to
disable the entire ECA engine at the framework level. Fix the model,
then re-enable.
Future direction¶
- The modeler is being replaced. The replacement should be drop-in for the data model but with a cleaner UX. Don't write tooling that hard-codes BPMN.io specifics.
- The model list will likely grow (notifications, federation
transport) and split (
fedms/components/eca#8 Break up ECA models into smaller ones). - The condition-plugin set in
fedms_taskwill grow as new patterns emerge.
Next steps¶
- ECA models overview — the index of all 10 models.
- Concepts → Task patterns — the consumer of the engine.
- Architecture — why ECA-first.