elsa-core/src/modules/Elsa.Workflows.Runtime
Sipke Schoorstra f9580e7472
fix(runtime): let a trigger index payloads under per-payload stimulus names (#7950)
* fix(runtime): let a trigger index payloads under per-payload stimulus names

TriggerIndexingContext.TriggerName is a single field read once after all
payloads have been collected, so one ITrigger could only ever register its
payloads under one stimulus name. An implementation that assigned the name
more than once - which the stimulus extension methods do as a side effect -
had the last write applied to every row, and since Hash derives from the same
name, the earlier payloads were stored under a hash no publisher computes.

Adds an additive, opt-in path: a payload returned from GetTriggerPayloadsAsync
may be wrapped in NamedTriggerPayload, which carries the stimulus name for that
payload alone. The indexer takes name and payload from the same source, so
Hash always matches the Name stored beside it, and the wrapper is unwrapped
before storage so payload consumers (validators, the trigger diff comparer,
the scheduler) see the payload the trigger produced.

TriggerName keeps its existing meaning as the default for payloads that do not
carry their own, so every existing ITrigger indexes identically: same Name,
same Hash, same Payload, same row count. The empty-payload placeholder row is
left alone.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(runtime): refuse a nested trigger payload wrapper

NamedTriggerPayload documented that its Payload is never itself a
wrapper, but nothing enforced it. Reject a NamedTriggerPayload whose
payload is another NamedTriggerPayload at construction time, matching
the existing guard against a blank name.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 23:43:59 +02:00
..
ActivationValidators
Activities Fix BulkDispatchWorkflows sharing input dictionary across dispatches (#7284) 2026-04-15 14:20:44 +02:00
Bookmarks
Commands Add workflow dispatch transactional outbox (#7517) 2026-05-22 00:13:16 +02:00
Comparers Refactor: Overhauls workflow JSON type serialization (#7549) 2026-05-31 11:09:39 +02:00
Constants
Contexts
Contracts Merge pull request #7748 from elsa-workflows/sfmskywalker-fix-commit-state-atomicity 2026-06-23 03:10:36 +02:00
Discovery [codex] Fix console log metadata and type resolution (#7542) 2026-05-30 22:52:01 +02:00
Entities Add bookmark queue dead-letter store (#7516) 2026-05-21 23:43:36 +02:00
Enums Graceful shutdown for the workflow runtime (drain, pause, recover) (#7424) 2026-05-02 19:27:08 +02:00
Exceptions Graceful shutdown for the workflow runtime (drain, pause, recover) (#7424) 2026-05-02 19:27:08 +02:00
Extensions Refactor: Overhauls workflow JSON type serialization (#7549) 2026-05-31 11:09:39 +02:00
Features Fix workflow commit atomicity 2026-06-21 19:58:09 +02:00
Filters Add bookmark queue dead-letter store (#7516) 2026-05-21 23:43:36 +02:00
Handlers Add workflow dispatch transactional outbox (#7517) 2026-05-22 00:13:16 +02:00
HealthChecks Address health check review feedback 2026-05-21 02:13:19 +02:00
HostedServices Graceful shutdown for the workflow runtime (drain, pause, recover) (#7424) 2026-05-02 19:27:08 +02:00
IngressSources Graceful shutdown for the workflow runtime (drain, pause, recover) (#7424) 2026-05-02 19:27:08 +02:00
Lifecycle Graceful shutdown for the workflow runtime (drain, pause, recover) (#7424) 2026-05-02 19:27:08 +02:00
LogPersistence
Matches
Messages Adds activity execution call stack support (#7271) 2026-02-24 15:23:59 +01:00
Middleware Add workflow dispatch transactional outbox (#7517) 2026-05-22 00:13:16 +02:00
Models Add workflow dispatch transactional outbox (#7517) 2026-05-22 00:13:16 +02:00
Notifications Graceful shutdown for the workflow runtime (drain, pause, recover) (#7424) 2026-05-02 19:27:08 +02:00
OptionConfigurators Graceful shutdown for the workflow runtime (drain, pause, recover) (#7424) 2026-05-02 19:27:08 +02:00
Options Fix workflow commit atomicity 2026-06-21 19:58:09 +02:00
OrderDefinitions Add bookmark queue dead-letter store (#7516) 2026-05-21 23:43:36 +02:00
Parameters
Params
Providers [codex] Harden workflow JSON type resolution (#7499) 2026-05-22 15:25:49 +02:00
Requests Graceful shutdown for the workflow runtime (drain, pause, recover) (#7424) 2026-05-02 19:27:08 +02:00
Responses Distributed locks to prevent multiple pods executing Reload and Refresh (#7311) 2026-02-23 20:56:15 +01:00
Results
Services fix(runtime): let a trigger index payloads under per-payload stimulus names (#7950) 2026-08-17 23:43:59 +02:00
ShellFeatures Fix workflow commit atomicity 2026-06-21 19:58:09 +02:00
StartupTasks Graceful shutdown for the workflow runtime (drain, pause, recover) (#7424) 2026-05-02 19:27:08 +02:00
Stimuli
Stores Fix scheduling startup backlog catch-up 2026-06-21 19:43:09 +02:00
Tasks Add workflow dispatch transactional outbox (#7517) 2026-05-22 00:13:16 +02:00
UIHints
AssemblyInfo.cs Add workflow dispatch transactional outbox (#7517) 2026-05-22 00:13:16 +02:00
Elsa.Workflows.Runtime.csproj [codex] Extract dashboard contributors into companion modules (#7692) 2026-06-05 14:30:52 +02:00
Elsa.Workflows.Runtime.csproj.DotSettings
FodyWeavers.xml
RuntimeStimulusNames.cs
WorkflowRuntimeTypeAliasRegistrar.cs Refactor: Overhauls workflow JSON type serialization (#7549) 2026-05-31 11:09:39 +02:00