* fix(bpmn): keep subprocess bodies through the document PUT BpmnDefinitions lists only top-level processes: Bpmn.Interchange carries the body of an embedded subprocess, transaction or event subprocess as the subprocess element's NestedProcess work binding. The document GET therefore never returned the bodies, and the PUT wrote the posted document without any bindings, so BpmnXmlWriter wrote every subprocess empty and the re-import replaced the definition with one whose subprocesses were empty. The PUT now re-reads the stored source and hands the writer the stored body of every subprocess element the posted document still declares, matched by element id, together with everything bound inside it (a call activity's vw:waitForCompletion lives only on its CallProcess binding). A removed subprocess's body is never written back, not even under a new element that reuses its bindingRef, and a subprocess with a stored body but no bindingRef is refused rather than emptied. The GET body, the ETag and the error codes are unchanged; nested content stays uneditable through the document. Bpmn.Interchange 0.2.0 also retains a copy of a subprocess's interpreted multiInstanceLoopCharacteristics inside its body. Handed back verbatim, that copy would override a posted marker on the next read and add another copy on every PUT, so the PUT drops it wherever the element carries a marker in the model. The D4 round-trip test now covers subprocess-boundary-events.bpmn and transaction-compensation.bpmn, copied from Studio's fixtures, plus two nested-scope assets, going through the endpoints' JSON options. Refs #8072 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs(bpmn): link the loop-marker workaround to its upstream issue Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
54 lines
2.4 KiB
XML
54 lines
2.4 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
|
|
xmlns:vw="https://bpmn.valenceworks.io/schema/bpmn"
|
|
id="Definitions_nested-subprocesses"
|
|
targetNamespace="http://bpmn.io/schema/bpmn">
|
|
<bpmn:process id="nested-subprocesses" name="Nested Subprocesses" isExecutable="true">
|
|
<bpmn:startEvent id="Start_1">
|
|
<bpmn:outgoing>Flow_1</bpmn:outgoing>
|
|
</bpmn:startEvent>
|
|
|
|
<bpmn:subProcess id="Outer" name="Outer">
|
|
<bpmn:extensionElements>
|
|
<vw:variable name="audits" typeHint="Object" />
|
|
</bpmn:extensionElements>
|
|
<bpmn:incoming>Flow_1</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_2</bpmn:outgoing>
|
|
<bpmn:startEvent id="Outer_Start">
|
|
<bpmn:outgoing>Outer_Flow_1</bpmn:outgoing>
|
|
</bpmn:startEvent>
|
|
|
|
<bpmn:subProcess id="Inner" name="Inner">
|
|
<bpmn:incoming>Outer_Flow_1</bpmn:incoming>
|
|
<bpmn:outgoing>Outer_Flow_2</bpmn:outgoing>
|
|
<bpmn:multiInstanceLoopCharacteristics isSequential="true" vw:collection="audits" vw:itemVariable="audit" />
|
|
<bpmn:startEvent id="Inner_Start">
|
|
<bpmn:outgoing>Inner_Flow_1</bpmn:outgoing>
|
|
</bpmn:startEvent>
|
|
<bpmn:callActivity id="StartAudit" name="Start Audit" calledElement="audit-workflow" vw:waitForCompletion="false">
|
|
<bpmn:incoming>Inner_Flow_1</bpmn:incoming>
|
|
<bpmn:outgoing>Inner_Flow_2</bpmn:outgoing>
|
|
</bpmn:callActivity>
|
|
<bpmn:endEvent id="Inner_End">
|
|
<bpmn:incoming>Inner_Flow_2</bpmn:incoming>
|
|
</bpmn:endEvent>
|
|
<bpmn:sequenceFlow id="Inner_Flow_1" sourceRef="Inner_Start" targetRef="StartAudit" />
|
|
<bpmn:sequenceFlow id="Inner_Flow_2" sourceRef="StartAudit" targetRef="Inner_End" />
|
|
</bpmn:subProcess>
|
|
|
|
<bpmn:endEvent id="Outer_End">
|
|
<bpmn:incoming>Outer_Flow_2</bpmn:incoming>
|
|
</bpmn:endEvent>
|
|
<bpmn:sequenceFlow id="Outer_Flow_1" sourceRef="Outer_Start" targetRef="Inner" />
|
|
<bpmn:sequenceFlow id="Outer_Flow_2" sourceRef="Inner" targetRef="Outer_End" />
|
|
</bpmn:subProcess>
|
|
|
|
<bpmn:endEvent id="End_1">
|
|
<bpmn:incoming>Flow_2</bpmn:incoming>
|
|
</bpmn:endEvent>
|
|
|
|
<bpmn:sequenceFlow id="Flow_1" sourceRef="Start_1" targetRef="Outer" />
|
|
<bpmn:sequenceFlow id="Flow_2" sourceRef="Outer" targetRef="End_1" />
|
|
</bpmn:process>
|
|
</bpmn:definitions>
|