feat(workflow): WachtOpDocumenten wait task + 30-day timeout cancellation (refs #102)

Inserts a WachtOpDocumenten user task after OpenZaakAanmaken with an interrupting
P30D boundary timer: "documents received" completes it and the process continues to
the diploma routing; on timeout the RegistratieVerlopen external-worker task runs
and the process ends as verlopen (ADR-0017). Verified live against flowable-rest:
complete -> routes to Beoordelen; timer fire -> RegistratieVerlopen job (carrying
registrationId) + the wait task cancelled.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
not
2026-07-20 09:53:01 +02:00
co-authored by Claude Opus 4.8
parent 3f04cb856f
commit 9bd71f1e78
+87 -32
View File
@@ -22,10 +22,16 @@
(BeoordelingEscaleren); the Workflow Client reassigns the still-open Beoordelen task from the (BeoordelingEscaleren); the Workflow Client reassigns the still-open Beoordelen task from the
behandelaar group to teamlead (ADR-0015). The Beoordelen task stays open throughout — the timer behandelaar group to teamlead (ADR-0015). The Beoordelen task stays open throughout — the timer
only changes who may claim it. only changes who may claim it.
S-13 adds diploma-eligibility routing: between OpenZaakAanmaken and Beoordelen a DMN service S-13 adds diploma-eligibility routing: between the document wait and Beoordelen a DMN service
task (flowable:type="dmn") evaluates the `diploma-eligibility` decision on the diplomaOrigin task (flowable:type="dmn") evaluates the `diploma-eligibility` decision on the diplomaOrigin
start variable; an exclusive gateway routes a foreign diploma through the CBGV-advies user task start variable; an exclusive gateway routes a foreign diploma through the CBGV-advies user task
before Beoordelen, a domestic one straight there (ADR-0016). --> before Beoordelen, a domestic one straight there (ADR-0016).
S-10a adds the document wait: right after the zaak is opened the process parks at a
WachtOpDocumenten user task with an INTERRUPTING P30D boundary timer. "Documents received"
(the S-10b upload, via the Workflow Client) completes the task and the process continues to the
diploma routing; if the 30 days lapse first the timer cancels the task and runs the
RegistratieVerlopen external-worker task, whose worker expires the registration to VERLOPEN,
ending the process as "verlopen" (ADR-0017). -->
<message id="Message_Ingetrokken" name="RegistratieIngetrokken"/> <message id="Message_Ingetrokken" name="RegistratieIngetrokken"/>
<process id="registratie" name="Registratie ontvangen" isExecutable="true"> <process id="registratie" name="Registratie ontvangen" isExecutable="true">
@@ -38,7 +44,32 @@
flowable:type="external-worker" flowable:type="external-worker"
flowable:topic="OpenZaakAanmaken"/> flowable:topic="OpenZaakAanmaken"/>
<sequenceFlow id="flow2" sourceRef="OpenZaakAanmaken" targetRef="DiplomaEligibiliteit"/> <sequenceFlow id="flow2" sourceRef="OpenZaakAanmaken" targetRef="WachtOpDocumenten"/>
<!-- S-10a: wait for the citizen's documents (diploma). The process parks here; "documents received"
(the S-10b upload path) completes the task via the Workflow Client. An INTERRUPTING P30D
boundary timer cancels the case if the documents never arrive (ADR-0017). -->
<userTask id="WachtOpDocumenten" name="Wacht op documenten"/>
<sequenceFlow id="flow2doc" sourceRef="WachtOpDocumenten" targetRef="DiplomaEligibiliteit"/>
<boundaryEvent id="DocumentenTimer" attachedToRef="WachtOpDocumenten" cancelActivity="true">
<timerEventDefinition>
<timeDuration>P30D</timeDuration>
</timerEventDefinition>
</boundaryEvent>
<sequenceFlow id="flow7" sourceRef="DocumentenTimer" targetRef="RegistratieVerlopen"/>
<!-- On timeout: an external-worker task the Workflow Client picks up to expire the registration to
VERLOPEN (S-10a). Its topic mirrors OpenZaakAanmaken/BeoordelingEscaleren. -->
<serviceTask id="RegistratieVerlopen" name="Registratie laten verlopen"
flowable:type="external-worker"
flowable:topic="RegistratieVerlopen"/>
<sequenceFlow id="flow8" sourceRef="RegistratieVerlopen" targetRef="endVerlopen"/>
<endEvent id="endVerlopen" name="Registratie verlopen"/>
<!-- S-13: evaluate the diploma-eligibility DMN inline (ADR-0016). A Flowable DMN service task <!-- S-13: evaluate the diploma-eligibility DMN inline (ADR-0016). A Flowable DMN service task
(flowable:type="dmn" — NOT a businessRuleTask, whose default implementation is the legacy (flowable:type="dmn" — NOT a businessRuleTask, whose default implementation is the legacy
@@ -114,35 +145,47 @@
<bpmndi:BPMNShape id="s_task" bpmnElement="OpenZaakAanmaken"> <bpmndi:BPMNShape id="s_task" bpmnElement="OpenZaakAanmaken">
<omgdc:Bounds x="180" y="85" width="120" height="60"/> <omgdc:Bounds x="180" y="85" width="120" height="60"/>
</bpmndi:BPMNShape> </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="s_wacht" bpmnElement="WachtOpDocumenten">
<omgdc:Bounds x="340" y="85" width="120" height="60"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="s_documentenTimer" bpmnElement="DocumentenTimer">
<omgdc:Bounds x="385" y="130" width="30" height="30"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="s_verlopen" bpmnElement="RegistratieVerlopen">
<omgdc:Bounds x="340" y="220" width="120" height="60"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="s_endVerlopen" bpmnElement="endVerlopen">
<omgdc:Bounds x="510" y="235" width="30" height="30"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="s_dmn" bpmnElement="DiplomaEligibiliteit"> <bpmndi:BPMNShape id="s_dmn" bpmnElement="DiplomaEligibiliteit">
<omgdc:Bounds x="350" y="85" width="120" height="60"/> <omgdc:Bounds x="510" y="85" width="120" height="60"/>
</bpmndi:BPMNShape> </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="s_route" bpmnElement="RouteOpDiploma" isMarkerVisible="true"> <bpmndi:BPMNShape id="s_route" bpmnElement="RouteOpDiploma" isMarkerVisible="true">
<omgdc:Bounds x="520" y="90" width="40" height="40"/> <omgdc:Bounds x="680" y="90" width="40" height="40"/>
</bpmndi:BPMNShape> </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="s_cbgv" bpmnElement="CBGVAdvies"> <bpmndi:BPMNShape id="s_cbgv" bpmnElement="CBGVAdvies">
<omgdc:Bounds x="500" y="200" width="120" height="60"/> <omgdc:Bounds x="660" y="200" width="120" height="60"/>
</bpmndi:BPMNShape> </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="s_beoordelen" bpmnElement="Beoordelen"> <bpmndi:BPMNShape id="s_beoordelen" bpmnElement="Beoordelen">
<omgdc:Bounds x="630" y="85" width="120" height="60"/> <omgdc:Bounds x="790" y="85" width="120" height="60"/>
</bpmndi:BPMNShape> </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="s_end" bpmnElement="end"> <bpmndi:BPMNShape id="s_end" bpmnElement="end">
<omgdc:Bounds x="810" y="100" width="30" height="30"/> <omgdc:Bounds x="970" y="100" width="30" height="30"/>
</bpmndi:BPMNShape> </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="s_ingetrokken" bpmnElement="Ingetrokken"> <bpmndi:BPMNShape id="s_ingetrokken" bpmnElement="Ingetrokken">
<omgdc:Bounds x="690" y="135" width="30" height="30"/> <omgdc:Bounds x="850" y="135" width="30" height="30"/>
</bpmndi:BPMNShape> </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="s_endIngetrokken" bpmnElement="endIngetrokken"> <bpmndi:BPMNShape id="s_endIngetrokken" bpmnElement="endIngetrokken">
<omgdc:Bounds x="690" y="250" width="30" height="30"/> <omgdc:Bounds x="850" y="250" width="30" height="30"/>
</bpmndi:BPMNShape> </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="s_escaleerTimer" bpmnElement="EscaleerTimer"> <bpmndi:BPMNShape id="s_escaleerTimer" bpmnElement="EscaleerTimer">
<omgdc:Bounds x="700" y="70" width="30" height="30"/> <omgdc:Bounds x="860" y="70" width="30" height="30"/>
</bpmndi:BPMNShape> </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="s_escaleerBeoordeling" bpmnElement="EscaleerBeoordeling"> <bpmndi:BPMNShape id="s_escaleerBeoordeling" bpmnElement="EscaleerBeoordeling">
<omgdc:Bounds x="800" y="20" width="120" height="60"/> <omgdc:Bounds x="960" y="20" width="120" height="60"/>
</bpmndi:BPMNShape> </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="s_endEscaleren" bpmnElement="endEscaleren"> <bpmndi:BPMNShape id="s_endEscaleren" bpmnElement="endEscaleren">
<omgdc:Bounds x="970" y="35" width="30" height="30"/> <omgdc:Bounds x="1130" y="35" width="30" height="30"/>
</bpmndi:BPMNShape> </bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="e_flow1" bpmnElement="flow1"> <bpmndi:BPMNEdge id="e_flow1" bpmnElement="flow1">
<omgdi:waypoint x="130" y="115"/> <omgdi:waypoint x="130" y="115"/>
@@ -150,41 +193,53 @@
</bpmndi:BPMNEdge> </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="e_flow2" bpmnElement="flow2"> <bpmndi:BPMNEdge id="e_flow2" bpmnElement="flow2">
<omgdi:waypoint x="300" y="115"/> <omgdi:waypoint x="300" y="115"/>
<omgdi:waypoint x="350" y="115"/> <omgdi:waypoint x="340" y="115"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="e_flow2doc" bpmnElement="flow2doc">
<omgdi:waypoint x="460" y="115"/>
<omgdi:waypoint x="510" y="115"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="e_flow7" bpmnElement="flow7">
<omgdi:waypoint x="400" y="160"/>
<omgdi:waypoint x="400" y="220"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="e_flow8" bpmnElement="flow8">
<omgdi:waypoint x="460" y="250"/>
<omgdi:waypoint x="510" y="250"/>
</bpmndi:BPMNEdge> </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="e_flow2a" bpmnElement="flow2a"> <bpmndi:BPMNEdge id="e_flow2a" bpmnElement="flow2a">
<omgdi:waypoint x="470" y="115"/> <omgdi:waypoint x="630" y="115"/>
<omgdi:waypoint x="520" y="110"/> <omgdi:waypoint x="680" y="110"/>
</bpmndi:BPMNEdge> </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="e_flowDirect" bpmnElement="flowDirect"> <bpmndi:BPMNEdge id="e_flowDirect" bpmnElement="flowDirect">
<omgdi:waypoint x="560" y="110"/> <omgdi:waypoint x="720" y="110"/>
<omgdi:waypoint x="630" y="115"/> <omgdi:waypoint x="790" y="115"/>
</bpmndi:BPMNEdge> </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="e_flowCbgv" bpmnElement="flowCbgv"> <bpmndi:BPMNEdge id="e_flowCbgv" bpmnElement="flowCbgv">
<omgdi:waypoint x="540" y="130"/> <omgdi:waypoint x="700" y="130"/>
<omgdi:waypoint x="540" y="200"/> <omgdi:waypoint x="700" y="200"/>
</bpmndi:BPMNEdge> </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="e_flowCbgvNaarBeoordelen" bpmnElement="flowCbgvNaarBeoordelen"> <bpmndi:BPMNEdge id="e_flowCbgvNaarBeoordelen" bpmnElement="flowCbgvNaarBeoordelen">
<omgdi:waypoint x="620" y="230"/> <omgdi:waypoint x="780" y="230"/>
<omgdi:waypoint x="660" y="230"/> <omgdi:waypoint x="820" y="230"/>
<omgdi:waypoint x="660" y="145"/> <omgdi:waypoint x="820" y="145"/>
</bpmndi:BPMNEdge> </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="e_flow3" bpmnElement="flow3"> <bpmndi:BPMNEdge id="e_flow3" bpmnElement="flow3">
<omgdi:waypoint x="750" y="115"/> <omgdi:waypoint x="910" y="115"/>
<omgdi:waypoint x="810" y="115"/> <omgdi:waypoint x="970" y="115"/>
</bpmndi:BPMNEdge> </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="e_flow4" bpmnElement="flow4"> <bpmndi:BPMNEdge id="e_flow4" bpmnElement="flow4">
<omgdi:waypoint x="705" y="165"/> <omgdi:waypoint x="865" y="165"/>
<omgdi:waypoint x="705" y="250"/> <omgdi:waypoint x="865" y="250"/>
</bpmndi:BPMNEdge> </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="e_flow5" bpmnElement="flow5"> <bpmndi:BPMNEdge id="e_flow5" bpmnElement="flow5">
<omgdi:waypoint x="715" y="70"/> <omgdi:waypoint x="875" y="70"/>
<omgdi:waypoint x="715" y="50"/> <omgdi:waypoint x="875" y="50"/>
<omgdi:waypoint x="800" y="50"/> <omgdi:waypoint x="960" y="50"/>
</bpmndi:BPMNEdge> </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="e_flow6" bpmnElement="flow6"> <bpmndi:BPMNEdge id="e_flow6" bpmnElement="flow6">
<omgdi:waypoint x="920" y="50"/> <omgdi:waypoint x="1080" y="50"/>
<omgdi:waypoint x="970" y="50"/> <omgdi:waypoint x="1130" y="50"/>
</bpmndi:BPMNEdge> </bpmndi:BPMNEdge>
</bpmndi:BPMNPlane> </bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram> </bpmndi:BPMNDiagram>