elsa-workflows / elsa-workflows/elsa-extensions
EFCoreActivityExecutionStore.SaveManyAsync missed handlers of IEntitySavingHandler
- Dominant language
- C#
- Stars
- 49
- Forks
- 48
- Avg merge
- 21h 35m
- Merged PRs (30d)
- 20
Description
## Description
It seems that when saving activity execution from `DefaultCommitStateHandler` -> `activityExecutionLogRecordSink.PersistExecutionLogsAsync`, it uses `BulkUpsertExtensions.BulkUpsertAsync` to generate sql to insert records, which didn't go through DbContext, leading to all registers for `IEntitySavingHandler` were skipped.
I temporary did override the implementation for `StoreActivityExecutionLogSink` to use `activityExecutionStore.SaveAsync` instead of `SaveManyAsync` and it worked as expected
## Steps to Reproduce
1. Create a new handler of `IEntitySavingHandler` e.g: CustomEntitySavingHandler
2. Register to services
3. Run a workflow
## Expected Behavior
Expected that `CustomEntitySavingHandler` will be called on each `ActivityExecutionRecord`
## Actual Behavior
CustomEntitySavingHandler is called for others (like `StoredBookmark`) but not `ActivityExecutionRecord`
Contributor guide
Assessment
This issue has not been assessed yet.