-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Summary:
Introduce the ability for Elsa 3 to maintain and track a history of workflow variable mutations.
Background:
Elsa currently supports defining and using workflow variables, but once an activity modifies a variable, the previous state/value of the variable is lost. For debugging, audit, and data analysis purposes, it would be invaluable to have a traceable history of how a variable has changed over time throughout the workflow execution.
Feature Description:
-
History Object: Whenever a workflow variable is mutated (e.g., updated, deleted), capture:
- The previous value of the variable
- The new value of the variable
- The timestamp of mutation
- The activity ID/name that initiated the mutation
-
Accessible via API: Expose an API endpoint that allows users to query the history of a variable by workflow instance or variable name.
-
UI Integration: In Elsa's dashboard, under each workflow instance, provide a section/tab dedicated to showcasing the history of variable mutations in a timeline or tabular format.
-
Configurability: Allow users to turn on/off this feature at the workflow or global level to cater to performance and storage considerations.
Use Case:
Consider a workflow where variable X
starts with the value 10
, is updated to 20
by Activity A
, and then changed to 30
by Activity B
. With this feature, a user can trace back the mutations, understanding which activity modified the variable and when.
Potential Benefits:
- Enhanced debugging: Easily trace back the sources of unexpected variable values.
- Auditing: Maintain a clear record of how data changes throughout the workflow execution.
- Data Analysis: Analyze patterns of data mutations for insights and improvements.
Would love to hear thoughts on the feasibility, and any additional requirements or concerns associated with implementing this feature.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status