elsa-core/test/unit/Elsa.Workflows.Runtime.UnitTests/Services
Sipke Schoorstra 091e3bc0e4
fix(bpmn): let a process with only a plain start event publish (#8081)
* fix(bpmn): let a process with only a plain start event publish (#8078)

An imported root BpmnProcess is an ITrigger with CanStartWorkflow set
(IsRootScope). For a process whose start events carry no event definition
it rightly returns no payloads, but TriggerIndexer then stored a
null-payload placeholder row and ValidateWorkflowRequestHandler refused
publication with "Trigger should have a payload". That blocked import,
bind, publish and run for most Camunda models.

Adds an additive, opt-in seam: TriggerIndexingContext.RegistersNoTriggers.
A trigger that sets it and returns no payloads gets no row. It has no
effect when the trigger returns payloads, and a trigger that throws still
gets the placeholder, so a failure is never read as a deliberate decline.
Every other ITrigger indexes exactly as before.

BpmnProcess sets it only for a root scope none of whose start events
carries an event definition. A declared start that resolves to nothing,
such as a process whose only start is a refused timer, keeps the
placeholder and still fails publication. Nested scopes are opted out
before that check and are unchanged, and IsRootScope/CanStartWorkflow
semantics are untouched.

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

* test(bpmn): publish for real in the stale-after-publish tests

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

* test(bpmn): name the publish helper for what it does

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

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-12 11:07:59 -07:00
..
BackgroundStimulusDispatcherTests.cs Isolate background workflow dispatches from caller's cancellation token (#7291) 2026-04-14 10:55:38 +02:00
BackgroundWorkflowCancellationDispatcherTests.cs Isolate background workflow dispatches from caller's cancellation token (#7291) 2026-04-14 10:55:38 +02:00
BackgroundWorkflowDispatcherTests.cs Isolate background workflow dispatches from caller's cancellation token (#7291) 2026-04-14 10:55:38 +02:00
BookmarkQueueDeadLetterTests.cs Fix workflow commit atomicity 2026-06-21 19:58:09 +02:00
DefaultActivityExecutionMapperTests.cs Adds activity execution call stack support (#7271) 2026-02-24 15:23:59 +01:00
DefaultCommitStateHandlerTests.cs Address PR review comments 2026-06-23 03:07:50 +02:00
DefaultRegistriesPopulatorTests.cs Avoid repeated tenant-agnostic registry population 2026-08-02 01:59:45 +02:00
DefaultWorkflowDefinitionStorePopulatorTests.cs Merge branch 'fix/trigger-indexing-idempotency' 2026-02-24 15:30:54 +01:00
KeyValueFeatureTests.cs Add workflow dispatch transactional outbox (#7517) 2026-05-22 00:13:16 +02:00
KeyValueWorkflowDispatchOutboxStoreTests.cs Add workflow dispatch transactional outbox (#7517) 2026-05-22 00:13:16 +02:00
LocalWorkflowClientTests.cs Improves workflow materializer handling (#7195) 2026-01-19 08:59:12 +01:00
RestartInterruptedWorkflowsTaskTests.cs Fix tenant scope for interrupted workflow restarts (#7389) 2026-04-15 14:11:26 +02:00
TriggerIndexerTests.cs fix(bpmn): let a process with only a plain start event publish (#8081) 2026-09-12 11:07:59 -07:00
WorkflowCommitNotificationBufferTests.cs fix: restore commit notification scope before flush 2026-07-31 04:50:31 +02:00
WorkflowDispatchOutboxProcessorTests.cs Add workflow dispatch transactional outbox (#7517) 2026-05-22 00:13:16 +02:00