* 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>
28 lines
1.5 KiB
XML
28 lines
1.5 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
|
|
xmlns:elsa="https://elsaworkflows.io/schemas/bpmn/v1"
|
|
id="Definitions_message-start-order-process"
|
|
targetNamespace="http://bpmn.io/schema/bpmn">
|
|
<bpmn:message id="Message_OrderPlaced" name="OrderPlaced" />
|
|
<bpmn:process id="message-start-order-process" name="Message Start Order Process" isExecutable="true">
|
|
<bpmn:startEvent id="StartEvent_1" name="Order Placed">
|
|
<bpmn:outgoing>Flow_1</bpmn:outgoing>
|
|
<bpmn:messageEventDefinition id="MessageEventDefinition_1" messageRef="Message_OrderPlaced" />
|
|
</bpmn:startEvent>
|
|
<bpmn:serviceTask id="NotifyWarehouse" name="Notify Warehouse">
|
|
<bpmn:extensionElements>
|
|
<elsa:activityBinding activityType="Elsa.WriteLine">
|
|
<elsa:input name="text">{"typeName":"String","expression":{"type":"Literal","value":"Notifying the warehouse"}}</elsa:input>
|
|
</elsa:activityBinding>
|
|
</bpmn:extensionElements>
|
|
<bpmn:incoming>Flow_1</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_2</bpmn:outgoing>
|
|
</bpmn:serviceTask>
|
|
<bpmn:endEvent id="EndEvent_1" name="Order Handled">
|
|
<bpmn:incoming>Flow_2</bpmn:incoming>
|
|
</bpmn:endEvent>
|
|
<bpmn:sequenceFlow id="Flow_1" sourceRef="StartEvent_1" targetRef="NotifyWarehouse" />
|
|
<bpmn:sequenceFlow id="Flow_2" sourceRef="NotifyWarehouse" targetRef="EndEvent_1" />
|
|
</bpmn:process>
|
|
</bpmn:definitions>
|