elsa-core/src/modules/Elsa.Workflows.Core/Models
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
..
ActivityConstructionResult.cs Bugfix: error thrown in ReadSyntheticInputs 2026-01-20 13:27:55 +01:00
ActivityConstructorContext.cs Add output converter support at binding boundaries 2026-07-31 04:10:48 +02:00
ActivityDescriptor.cs Implement null TenantId for tenant-agnostic entities (#7226) 2026-02-02 10:59:01 +01:00
ActivityHandle.cs Add HealActivity alteration and handler with workflow fault recovery support 2025-06-13 20:35:19 +02:00
ActivityIncident.cs fix(core): a fault a container claimed is not an incident (#7923) 2026-08-12 05:20:22 +02:00
ActivityNode.cs
ActivityOutputRecord.cs
ActivityOutputRegister.cs
ActivityOutputs.cs
ActivityPort.cs
ActivityStateFilterResult.cs
ActivityWorkItem.cs Adds activity execution call stack support (#7271) 2026-02-24 15:23:59 +01:00
Argument.cs Update nullable argument defaults and enhance ForEach tests with additional edge cases. (#6928) 2025-09-27 17:55:40 +02:00
ArgumentDefinition.cs
BackgroundExecutionOutcome.cs
BackgroundExecutionResult.cs
Bookmark.cs Adds activity host registration support (#7172) 2025-12-27 20:52:52 +01:00
BookmarkInfo.cs
ChangeTrackingDictionary.cs
CreateBookmarkArgs.cs
EventGenerator.cs Support for Writing Custom Trigger Activities Using Existing Trigger Infrastructure (#6527) 2025-03-21 23:16:56 +01:00
Input.cs Update nullable argument defaults and enhance ForEach tests with additional edge cases. (#6928) 2025-09-27 17:55:40 +02:00
InputDefinition.cs
InputDescriptor.cs Remove duplicated EvaluatorType property from InputDescriptor. 2025-09-15 18:52:38 +02:00
InvokeWorkflowResult.cs
MissingActivityType.cs
NamedOutput.cs
NamedTriggerPayload.cs fix(runtime): let a trigger index payloads under per-payload stimulus names (#7950) 2026-08-17 23:43:59 +02:00
Output.cs Add output converter support at binding boundaries 2026-07-31 04:10:48 +02:00
OutputBindingDestination.cs Add output converter support at binding boundaries 2026-07-31 04:10:48 +02:00
OutputConversionContext.cs Add output converter support at binding boundaries 2026-07-31 04:10:48 +02:00
OutputConverterConfiguration.cs Add output converter support at binding boundaries 2026-07-31 04:10:48 +02:00
OutputConverterDescriptor.cs Add output converter support at binding boundaries 2026-07-31 04:10:48 +02:00
OutputConverterRegistration.cs Add output converter support at binding boundaries 2026-07-31 04:10:48 +02:00
OutputDefinition.cs
OutputDescriptor.cs
Port.cs
PortType.cs
PropertyDescriptor.cs
ResolvedVariable.cs
RunWorkflowResult.cs Update nullable argument defaults and enhance ForEach tests with additional edge cases. (#6928) 2025-09-27 17:55:40 +02:00
ScheduledActivity.cs
ScheduledActivityOptions.cs Adds activity execution call stack support (#7271) 2026-02-24 15:23:59 +01:00
SignalHandlerRegistration.cs
TenantRegistryData.cs Optimize activity registry descriptor lookup (#7538) 2026-05-31 13:15:42 +02:00
TriggerType.cs
TypeDescriptor.cs
VariableDefinition.cs
VariableModel.cs
VariableUpdateValue.cs
WorkflowDefinitionHandle.cs Implement Activity Testing API (#6719) 2025-06-23 10:03:10 +02:00
WorkflowExecutionLogEntry.cs
WorkflowExecutionLogEventNames.cs
WorkflowExecutionMode.cs
WorkflowExecutionState.cs
WorkflowGraph.cs Implement Activity Testing API (#6719) 2025-06-23 10:03:10 +02:00
WorkflowIdentity.cs
WorkflowInput.cs
WorkflowMetadata.cs
WorkflowOptions.cs
WorkflowPublication.cs