elsa-core/test/integration/Elsa.Workflows.IntegrationTests/Scenarios
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
..
ActivityNotificationsMiddleware Update namespaces and correct merge artefacts 2024-10-11 20:41:49 +02:00
ActivityOutputs Refactor variable initialization for clarity and consistency 2025-03-13 21:05:28 +01:00
Blocking Update namespaces and correct merge artefacts 2024-10-11 20:41:49 +02:00
BlockingAndBreaking Improves Fork activity and break signal handling (#7104) 2025-11-25 19:29:02 +01:00
BulkDispatchWithInput Fix BulkDispatchWorkflows sharing input dictionary across dispatches (#7284) 2026-04-15 14:20:44 +02:00
CanExecute Update namespaces and correct merge artefacts 2024-10-11 20:41:49 +02:00
Composites Update all dependencies to new projects. 2025-05-21 00:20:13 +01:00
CompositesAndOutcomes
CompositesPassingData Add unit and integration tests for SetOutput activity 2025-10-22 23:43:51 +02:00
DefaultActivityCommitStrategy Refactor commit strategy resolution for improved clarity and efficiency; remove unused example files and add a new CommitTracker helper for testing. 2025-12-16 08:01:49 -05:00
DefaultWorkflowCommitStrategy Clarify commit strategy fallback behavior in documentation; update test method signature for consistency 2025-12-16 08:01:49 -05:00
DependencyWorkflows Add integration tests for WorkflowDefinitionActivity scenarios (#6999) 2025-10-21 15:37:10 +02:00
DependencyWorkflowsPublishing Update namespaces and correct merge artefacts 2024-10-11 20:41:49 +02:00
ExplicitJoins
FaultSignals fix(core): a throwing FaultSignal handler must not escape the middleware (#7924) 2026-08-12 05:34:19 +02:00
FlowchartCompletion
FlowchartNextActivity Configures Flowchart Execution via DI (#7141) 2025-12-15 10:15:39 +01:00
HttpRequestWithLiquid Update all dependencies to new projects. 2025-05-21 00:20:13 +01:00
ImportAndExecute
ImportAndPublish Add opt-out for publish-on-validation-error failure (3.8) 2026-06-19 23:31:38 +02:00
Incidents Addresses warnings and enforces null safety (#7051) 2025-11-12 16:56:31 +01:00
JavaScriptFunctions Update all dependencies to new projects. 2025-05-21 00:20:13 +01:00
JavaScriptListsAndArrays Update all dependencies to new projects. 2025-05-21 00:20:13 +01:00
JavaScriptNativeVariables Update all dependencies to new projects. 2025-05-21 00:20:13 +01:00
JoinBehaviors Configures Flowchart Execution via DI (#7141) 2025-12-15 10:15:39 +01:00
JsonObjectSerialization Update namespaces and correct merge artefacts 2024-10-11 20:41:49 +02:00
JsonObjectToObjectRemainsJsonObject Update all dependencies to new projects. 2025-05-21 00:20:13 +01:00
ParentChildCompletion
ParentChildInputs
ParentChildOutputMapping
ProjectedEnumerableToArray Add integration tests for enumerables with projection to arrays (#7290) 2026-02-16 14:09:51 +01:00
RunAsynchronousActivityOutput [codex] Validate distributed runtime lock provider (#7515) 2026-05-21 23:29:14 +02:00
Serialization Addresses warnings and enforces null safety (#7051) 2025-11-12 16:56:31 +01:00
SetGetVariables Refactor variable initialization for clarity and consistency 2025-03-13 21:05:28 +01:00
SetGetVariablesArray Added IEnumerableTypeConverter (#7020) 2025-11-12 11:07:33 +01:00
SetGetVariablesFromActivities Refactor variable initialization for clarity and consistency 2025-03-13 21:05:28 +01:00
SmokeTests Adds integration tests for core activities (#7100) 2025-11-24 14:43:42 +01:00
TriggerIndexing fix(runtime): let a trigger index payloads under per-payload stimulus names (#7950) 2026-08-17 23:43:59 +02:00
WorkflowCancellation Improved support for named workflow instances 2025-03-02 11:17:18 +01:00
WorkflowDefinitionActivities Add integration tests for WorkflowDefinitionActivity scenarios (#6999) 2025-10-21 15:37:10 +02:00
WorkflowDefinitionStorePopulation Fix Multitenancy Support and Normalize Tenant ID Handling (#7217) 2026-01-30 19:54:13 +01:00
WorkflowDispatchNotifications Replace flaky Task.Delay with TaskCompletionSource for deterministic test synchronization 2025-12-24 23:47:55 +00:00
WorkflowInstanceName Improved support for named workflow instances 2025-03-02 11:17:18 +01:00
WorkflowOutputMapping
WorkflowResults Refactor variable initialization for clarity and consistency 2025-03-13 21:05:28 +01:00