elsa-workflows / elsa-workflows/elsa-core

[ENH] Execution Pipeline for Deterministic Cache Invalidation on Workflow Definition Events

Open
#5,456 1 comment 0 reactions 0 assignees View on GitHub
elsa 3 enhancement triaged
Dominant language
C#
Stars
7.9k
Forks
1.5k
Avg merge
15h 22m
Merged PRs (30d)
114

Description

Currently, to ensure that triggers are indexed on "fresh" workflow definitions, cache invalidation occurs during "publishing" / "retracting" / "deleting" events. This is done to ensure that the trigger indexer accesses the most up-to-date workflow definition from the cache.

However, this approach relies on the timing of these events, which can seem arbitrary. To improve this process, we should consider implementing an execution pipeline for publishing / retracting / deleting events. This pipeline would allow for deterministic control over the steps executed during these events, ensuring a more reliable and maintainable cache invalidation process.

#### Goals:
- Introduce a structured execution pipeline for publishing, retracting, and deleting events.
- Ensure deterministic cache invalidation timing.
- Improve deterministic processing of the workflow definition update process.

#### Benefits:
- Consistent and predictable cache invalidation + trigger indexing.
- Clear separation of concerns and more structured event handling.
- Allows additional steps to be added to the pipeline, increasing extensibility.

#### Additional Comments
What if publishing fails and triggers have already been stored; how do we ensure data integrity?
Perhaps we need a separate issue concerning atomic operations.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.