elsa-core/src/modules/Elsa.Workflows.Runtime/Services
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
..
ActivityExecutionService.cs Adds activity execution metadata support (#6699) 2025-05-30 15:37:57 +02:00
BackgroundActivityInvoker.cs Merge 3.5.1 into 3.6.0 (#6907) 2025-09-13 13:05:52 +02:00
BackgroundStimulusDispatcher.cs Isolate background workflow dispatches from caller's cancellation token (#7291) 2026-04-14 10:55:38 +02:00
BackgroundTaskDispatcher.cs
BackgroundWorkflowCancellationDispatcher.cs Isolate background workflow dispatches from caller's cancellation token (#7291) 2026-04-14 10:55:38 +02:00
BackgroundWorkflowDispatcher.cs Add workflow dispatch transactional outbox (#7517) 2026-05-22 00:13:16 +02:00
BookmarkBoundWorkflowService.cs Merge 3.5.1 into 3.6.0 (#6907) 2025-09-13 13:05:52 +02:00
BookmarkPersister.cs Refactor Fault Propagation and Simplify Bookmark Management (#6545) 2025-04-10 15:01:49 +02:00
BookmarkQueueDeadLetterManager.cs Add bookmark queue dead-letter store (#7516) 2026-05-21 23:43:36 +02:00
BookmarkQueueProcessor.cs Fix workflow commit atomicity 2026-06-21 19:58:09 +02:00
BookmarkQueueSignaler.cs Enhances workflow runtime resilience and signaling (#6643) 2025-05-13 13:51:47 +02:00
BookmarkQueueWorker.cs Fix workflow commit atomicity 2026-06-21 19:58:09 +02:00
BookmarkResumer.cs Merge 3.5.1 into 3.6.0 (#6907) 2025-09-13 13:05:52 +02:00
BookmarkUpdater.cs
DefaultActivityExecutionManager.cs
DefaultActivityExecutionMapper.cs Adds activity execution call stack support (#7271) 2026-02-24 15:23:59 +01:00
DefaultBookmarkManager.cs
DefaultBookmarkQueuePurger.cs Add bookmark queue dead-letter store (#7516) 2026-05-21 23:43:36 +02:00
DefaultCommitStateHandler.cs Fix commit notification flush edge cases 2026-06-23 02:44:06 +02:00
DefaultRegistriesPopulator.cs Avoid repeated tenant-agnostic registry population 2026-08-02 01:59:45 +02:00
DefaultWorkflowActivationStrategyEvaluator.cs
DefaultWorkflowDefinitionStorePopulator.cs Optimize workflow definition sync lookups (#7521) 2026-05-21 02:42:51 +02:00
DefaultWorkflowRegistry.cs Update multitenancy logic and improve Result handling: (#7281) 2026-02-11 10:11:12 +01:00
DefaultWorkflowRestarter.cs
DefaultWorkflowStarter.cs
DrainOrchestrator.cs Graceful shutdown for the workflow runtime (drain, pause, recover) (#7424) 2026-05-02 19:27:08 +02:00
DrainTriggerExecutor.cs Harden EF trigger persistence 2026-05-16 13:50:34 +02:00
EventPublisher.cs Addresses workflow identity reload conflict (#6909) 2025-09-15 11:56:01 +02:00
ExecutionCycleAwareCommitStateHandler.cs Graceful shutdown for the workflow runtime (drain, pause, recover) (#7424) 2026-05-02 19:27:08 +02:00
ExecutionCycleRegistry.cs Graceful shutdown for the workflow runtime (drain, pause, recover) (#7424) 2026-05-02 19:27:08 +02:00
HeartbeatGenerator.cs
IngressSourceRegistry.cs Graceful shutdown for the workflow runtime (drain, pause, recover) (#7424) 2026-05-02 19:27:08 +02:00
InterruptedRecoveryScanner.cs Graceful shutdown for the workflow runtime (drain, pause, recover) (#7424) 2026-05-02 19:27:08 +02:00
KeyValueWorkflowDispatchOutboxStore.cs Add workflow dispatch transactional outbox (#7517) 2026-05-22 00:13:16 +02:00
LocalBackgroundActivityScheduler.cs
LocalWorkflowClient.cs Adds activity execution call stack support (#7271) 2026-02-24 15:23:59 +01:00
LocalWorkflowRuntime.cs
LocalWorkflowRuntime.Obsolete.cs
NoopWorkflowCommitTransaction.cs Fix workflow commit atomicity 2026-06-21 19:58:09 +02:00
ObsoleteWorkflowRuntime.cs Addresses warnings and enforces null safety (#7051) 2025-11-12 16:56:31 +01:00
QuiescenceSignal.cs Refactor QuiescenceSignal to inject IServiceScopeFactory, enhance tenant ID handling, and expand unit tests with DI capabilities. 2026-05-03 17:56:37 +02:00
StimulusProxyWorkflowInbox.cs Addresses warnings and enforces null safety (#7051) 2025-11-12 16:56:31 +01:00
StimulusSender.cs Merge 3.5.1 into 3.6.0 (#6907) 2025-09-13 13:05:52 +02:00
StoreActivityExecutionLogSink.cs Address PR review comments 2026-06-23 03:07:50 +02:00
StoreBookmarkQueue.cs Merge 3.5.1 into 3.6.0 (#6907) 2025-09-13 13:05:52 +02:00
StoreWorkflowExecutionLogSink.cs Fix workflow commit atomicity 2026-06-21 19:58:09 +02:00
SynchronousTaskDispatcher.cs
TaskReporter.cs
TransactionalWorkflowDispatcher.cs Add workflow dispatch transactional outbox (#7517) 2026-05-22 00:13:16 +02:00
TriggerBoundWorkflowService.cs
TriggerIndexer.cs fix(runtime): let a trigger index payloads under per-payload stimulus names (#7950) 2026-08-17 23:43:59 +02:00
TriggerInvoker.cs Add support for passing initial variables 2025-03-08 11:47:58 +01:00
ValidatingWorkflowDispatcher.cs Addresses warnings and enforces null safety (#7051) 2025-11-12 16:56:31 +01:00
WorkflowCanceler.cs
WorkflowCancellationService.cs Refactor TriggerStore methods and update configurations. 2025-06-05 09:03:37 +02:00
WorkflowCommitNotificationBuffer.cs fix: restore commit notification scope before flush 2026-07-31 04:50:31 +02:00
WorkflowCommitNotificationSender.cs Fix workflow commit atomicity 2026-06-21 19:58:09 +02:00
WorkflowDefinitionRefresher.cs Add distributed workflow runtime implementation. 2025-06-03 09:58:20 +02:00
WorkflowDefinitionsReloader.cs Fixing workflow reload logic (#7324) 2026-02-25 19:14:08 +01:00
WorkflowDispatchOutbox.cs Add workflow dispatch transactional outbox (#7517) 2026-05-22 00:13:16 +02:00
WorkflowDispatchOutboxAccessor.cs Add workflow dispatch transactional outbox (#7517) 2026-05-22 00:13:16 +02:00
WorkflowDispatchOutboxProcessor.cs Add workflow dispatch transactional outbox (#7517) 2026-05-22 00:13:16 +02:00
WorkflowExecutionLogRecordExtractor.cs Remove obsolete properties and refactor activity evaluation (#6603) 2025-04-18 16:21:25 +02:00
WorkflowHeartbeatGeneratorFactory.cs
WorkflowHost.cs Update nullable argument defaults and enhance ForEach tests with additional edge cases. (#6928) 2025-09-27 17:55:40 +02:00
WorkflowHostFactory.cs
WorkflowInvoker.cs
WorkflowMatcher.cs
WorkflowResumer.cs Merge 3.5.1 into 3.6.0 (#6907) 2025-09-13 13:05:52 +02:00
WorkflowRuntimeAdminService.cs Graceful shutdown for the workflow runtime (drain, pause, recover) (#7424) 2026-05-02 19:27:08 +02:00