Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RET-4515: Add ReferralNumber to Referral Task Names #103

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/" xmlns:camunda="http://camunda.org/schema/1.0/dmn" xmlns:biodi="http://bpmn.io/schema/dmn/biodi/2.0" xmlns:dmndi="https://www.omg.org/spec/DMN/20191111/DMNDI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" id="wa-initiation-definition" name="DRD" namespace="http://camunda.org/schema/1.0/dmn" exporter="Camunda Modeler" exporterVersion="5.16.0">
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/" xmlns:camunda="http://camunda.org/schema/1.0/dmn" xmlns:biodi="http://bpmn.io/schema/dmn/biodi/2.0" xmlns:dmndi="https://www.omg.org/spec/DMN/20191111/DMNDI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" id="wa-initiation-definition" name="DRD" namespace="http://camunda.org/schema/1.0/dmn" exporter="Camunda Modeler" exporterVersion="5.16.0">
<decision id="wa-task-initiation-employment-et_englandwales" name="ET Task initiation DMN">
<informationRequirement id="InformationRequirement_0dnw86r">
<requiredDecision href="#Decision_0la4l4o" />
</informationRequirement>
<informationRequirement id="InformationRequirement_19o3lfi">
<requiredDecision href="#Decision_0dpy65m" />
</informationRequirement>
<decisionTable id="DecisionTable_0jtevuc" hitPolicy="COLLECT">
<input id="Input_1" label="Event Id" biodi:width="342" camunda:inputVariable="eventId">
<inputExpression id="InputExpression_1" typeRef="string">
Expand Down Expand Up @@ -103,19 +109,19 @@ else null</text>
<inputExpression id="LiteralExpression_08q2e16" typeRef="string">
<text>if(additionalData != null
and additionalData.Data != null
and additionalData.Data.etInitialConsiderationRule27 != null
and additionalData.Data.etInitialConsiderationRule27 != null
and additionalData.Data.etInitialConsiderationRule27.etICRule27ClaimToBe != null)
then additionalData.Data.etInitialConsiderationRule27.etICRule27ClaimToBe
else if (additionalData != null
and additionalData.Data != null
and additionalData.Data.etInitialConsiderationRule28 != null
and additionalData.Data.etInitialConsiderationRule28 != null
and additionalData.Data.etInitialConsiderationRule28.etICRule28ClaimToBe != null)
then additionalData.Data.etInitialConsiderationRule28.etICRule28ClaimToBe
else null</text>
</inputExpression>
</input>
<output id="Output_1" label="Task Id" name="taskId" typeRef="string" biodi:width="255" />
<output id="OutputClause_0p5fhhd" label="Name" name="name" typeRef="string" biodi:width="284" />
<output id="OutputClause_0p5fhhd" label="Name" name="name" typeRef="string" biodi:width="369" />
<output id="OutputClause_165p3r3" label="Delay Duration" name="delayDuration" typeRef="integer" />
<output id="OutputClause_10rno4c" label="Process Categories Identifiers" name="processCategories" typeRef="string" biodi:width="300" />
<rule id="DecisionRule_1sfku1u">
Expand Down Expand Up @@ -203,8 +209,7 @@ else null</text>
<text>"ReviewReferralAdmin"</text>
</outputEntry>
<outputEntry id="LiteralExpression_16yf2nj">
<text>"Review Referral - "
+ sort(additionalData.Data.referralCollection, function(x,y) number(x.value.referralNumber) &gt; number(y.value.referralNumber)).value.referralSubject[1]</text>
<text>LATEST_REFERRAL_TASK_NAME</text>
</outputEntry>
<outputEntry id="LiteralExpression_0n9o39e">
<text></text>
Expand Down Expand Up @@ -345,8 +350,7 @@ else null</text>
<text>"ReviewReferralJudiciary"</text>
</outputEntry>
<outputEntry id="LiteralExpression_16t7tco">
<text>"Review Referral - "
+ sort(additionalData.Data.referralCollection, function(x,y) number(x.value.referralNumber) &gt; number(y.value.referralNumber)).value.referralSubject[1]</text>
<text>LATEST_REFERRAL_TASK_NAME</text>
</outputEntry>
<outputEntry id="LiteralExpression_0zdr7bg">
<text></text>
Expand Down Expand Up @@ -440,8 +444,7 @@ else null</text>
<text>"ReviewReferralLegalOps"</text>
</outputEntry>
<outputEntry id="LiteralExpression_1x90otf">
<text>"Review Referral - "
+ sort(additionalData.Data.referralCollection, function(x,y) number(x.value.referralNumber) &gt; number(y.value.referralNumber)).value.referralSubject[1]</text>
<text>LATEST_REFERRAL_TASK_NAME</text>
</outputEntry>
<outputEntry id="LiteralExpression_0iaqh1t">
<text></text>
Expand Down Expand Up @@ -488,8 +491,7 @@ else null</text>
<text>"ReviewReferralResponseAdmin"</text>
</outputEntry>
<outputEntry id="LiteralExpression_0qcsldu">
<text>"Review Referral Response - "
+ sort(flatten(additionalData.Data.referralCollection[value.referralReplyCollection!=null].value.referralReplyCollection), function(x,y) date and time(if(x.value.replyDateTime!=null)then x.value.replyDateTime else "2023-01-01T00:00:00.000") &gt; date and time(if(y.value.replyDateTime!=null)then y.value.replyDateTime else "2023-01-01T00:00:00.000")).value.referralSubject[1]</text>
<text>LATEST_REFERRAL_REPLY_TASK_NAME</text>
</outputEntry>
<outputEntry id="LiteralExpression_0kmxycv">
<text></text>
Expand Down Expand Up @@ -536,8 +538,7 @@ else null</text>
<text>"ReviewReferralResponseJudiciary"</text>
</outputEntry>
<outputEntry id="LiteralExpression_08j7d7p">
<text>"Review Referral Response - "
+ sort(flatten(additionalData.Data.referralCollection[value.referralReplyCollection!=null].value.referralReplyCollection), function(x,y) date and time(if(x.value.replyDateTime!=null)then x.value.replyDateTime else "2023-01-01T00:00:00.000") &gt; date and time(if(y.value.replyDateTime!=null)then y.value.replyDateTime else "2023-01-01T00:00:00.000")).value.referralSubject[1]</text>
<text>LATEST_REFERRAL_REPLY_TASK_NAME</text>
</outputEntry>
<outputEntry id="LiteralExpression_0zcsqzi">
<text></text>
Expand Down Expand Up @@ -584,8 +585,7 @@ else null</text>
<text>"ReviewReferralResponseLegalOps"</text>
</outputEntry>
<outputEntry id="LiteralExpression_03wz7tv">
<text>"Review Referral Response - "
+ sort(flatten(additionalData.Data.referralCollection[value.referralReplyCollection!=null].value.referralReplyCollection), function(x,y) date and time(if(x.value.replyDateTime!=null)then x.value.replyDateTime else "2023-01-01T00:00:00.000") &gt; date and time(if(y.value.replyDateTime!=null)then y.value.replyDateTime else "2023-01-01T00:00:00.000")).value.referralSubject[1]</text>
<text>LATEST_REFERRAL_REPLY_TASK_NAME</text>
</outputEntry>
<outputEntry id="LiteralExpression_14hvioj">
<text></text>
Expand Down Expand Up @@ -1545,10 +1545,57 @@ else null</text>
</rule>
</decisionTable>
</decision>
<decision id="Decision_0la4l4o" name="Latest Referral Reply - Task Name">
<variable id="InformationItem_1qtatvh" name="LATEST_REFERRAL_REPLY_TASK_NAME" typeRef="string" />
<literalExpression id="LiteralExpression_0h88al5">
<text>if(additionalData!=null
and additionalData.Data!=null
and additionalData.Data.referralCollection!=null
and count(additionalData.Data.referralCollection[count(value.referralReplyCollection)&gt;0])&gt;0)
then
"Review Referral #"
+ sort(flatten(additionalData.Data.referralCollection[value.referralReplyCollection!=null].value.referralReplyCollection), function(x,y) date and time(if(x.value.replyDateTime!=null)then x.value.replyDateTime else "2023-01-01T00:00:00.000") &gt; date and time(if(y.value.replyDateTime!=null)then y.value.replyDateTime else "2023-01-01T00:00:00.000"))[1].value.referralNumber
+ " - "
+ sort(flatten(additionalData.Data.referralCollection[value.referralReplyCollection!=null].value.referralReplyCollection), function(x,y) date and time(if(x.value.replyDateTime!=null)then x.value.replyDateTime else "2023-01-01T00:00:00.000") &gt; date and time(if(y.value.replyDateTime!=null)then y.value.replyDateTime else "2023-01-01T00:00:00.000"))[1].value.referralSubject
+ " Response"
else null</text>
</literalExpression>
</decision>
<decision id="Decision_0dpy65m" name="Latest Referral - Task Name">
<variable id="InformationItem_0r9rcnq" name="LATEST_REFERRAL_TASK_NAME" typeRef="string" />
<literalExpression id="LiteralExpression_0sbx49n">
<text>if(additionalData!=null
and additionalData.Data!=null
and additionalData.Data.referralCollection!=null
and count(additionalData.Data.referralCollection) &gt; 0)
then
"Review Referral #"
+ sort(additionalData.Data.referralCollection, function(x,y) number(x.value.referralNumber) &gt; number(y.value.referralNumber))[1].value.referralNumber
+ " - "
+ sort(additionalData.Data.referralCollection, function(x,y) number(x.value.referralNumber) &gt; number(y.value.referralNumber))[1].value.referralSubject
else null</text>
</literalExpression>
</decision>
<dmndi:DMNDI>
<dmndi:DMNDiagram id="DMNDiagram_0b2rkcb">
<dmndi:DMNShape id="DMNShape_0wc7glt" dmnElementRef="wa-task-initiation-employment-et_englandwales">
<dc:Bounds height="80" width="180" x="150" y="80" />
<dc:Bounds height="80" width="180" x="270" y="80" />
</dmndi:DMNShape>
<dmndi:DMNEdge id="DMNEdge_0s4sgvn" dmnElementRef="InformationRequirement_0dnw86r">
<di:waypoint x="460" y="210" />
<di:waypoint x="390" y="180" />
<di:waypoint x="390" y="160" />
</dmndi:DMNEdge>
<dmndi:DMNShape id="DMNShape_1r683zz" dmnElementRef="Decision_0la4l4o">
<dc:Bounds height="80" width="180" x="370" y="210" />
</dmndi:DMNShape>
<dmndi:DMNEdge id="DMNEdge_13aw784" dmnElementRef="InformationRequirement_19o3lfi">
<di:waypoint x="250" y="210" />
<di:waypoint x="330" y="180" />
<di:waypoint x="330" y="160" />
</dmndi:DMNEdge>
<dmndi:DMNShape id="DMNShape_125889q" dmnElementRef="Decision_0dpy65m">
<dc:Bounds height="80" width="180" x="160" y="210" />
</dmndi:DMNShape>
</dmndi:DMNDiagram>
</dmndi:DMNDI>
Expand Down
73 changes: 60 additions & 13 deletions src/main/resources/wa-task-initiation-employment-et_scotland.dmn
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/" xmlns:camunda="http://camunda.org/schema/1.0/dmn" xmlns:biodi="http://bpmn.io/schema/dmn/biodi/2.0" xmlns:dmndi="https://www.omg.org/spec/DMN/20191111/DMNDI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" id="wa-initiation-definition" name="DRD" namespace="http://camunda.org/schema/1.0/dmn" exporter="Camunda Modeler" exporterVersion="5.16.0">
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/" xmlns:camunda="http://camunda.org/schema/1.0/dmn" xmlns:biodi="http://bpmn.io/schema/dmn/biodi/2.0" xmlns:dmndi="https://www.omg.org/spec/DMN/20191111/DMNDI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" id="wa-initiation-definition" name="DRD" namespace="http://camunda.org/schema/1.0/dmn" exporter="Camunda Modeler" exporterVersion="5.16.0">
<decision id="wa-task-initiation-employment-et_scotland" name="ET Task initiation DMN">
<informationRequirement id="InformationRequirement_1l2v2xj">
<requiredDecision href="#Decision_1xqgkq6" />
</informationRequirement>
<informationRequirement id="InformationRequirement_05r15im">
<requiredDecision href="#Decision_1merw3p" />
</informationRequirement>
<decisionTable id="DecisionTable_0jtevuc" hitPolicy="COLLECT">
<input id="Input_1" label="Event Id" biodi:width="201" camunda:inputVariable="eventId">
<inputExpression id="InputExpression_1" typeRef="string">
Expand Down Expand Up @@ -203,8 +209,7 @@ else null</text>
<text>"ReviewReferralAdmin"</text>
</outputEntry>
<outputEntry id="LiteralExpression_16yf2nj">
<text>"Review Referral - "
+ sort(additionalData.Data.referralCollection, function(x,y) number(x.value.referralNumber) &gt; number(y.value.referralNumber)).value.referralSubject[1]</text>
<text>LATEST_REFERRAL_TASK_NAME</text>
</outputEntry>
<outputEntry id="LiteralExpression_0n9o39e">
<text></text>
Expand Down Expand Up @@ -345,8 +350,7 @@ else null</text>
<text>"ReviewReferralJudiciary"</text>
</outputEntry>
<outputEntry id="LiteralExpression_16t7tco">
<text>"Review Referral - "
+ sort(additionalData.Data.referralCollection, function(x,y) number(x.value.referralNumber) &gt; number(y.value.referralNumber)).value.referralSubject[1]</text>
<text>LATEST_REFERRAL_TASK_NAME</text>
</outputEntry>
<outputEntry id="LiteralExpression_0zdr7bg">
<text></text>
Expand Down Expand Up @@ -440,8 +444,7 @@ else null</text>
<text>"ReviewReferralLegalOps"</text>
</outputEntry>
<outputEntry id="LiteralExpression_1x90otf">
<text>"Review Referral - "
+ sort(additionalData.Data.referralCollection, function(x,y) number(x.value.referralNumber) &gt; number(y.value.referralNumber)).value.referralSubject[1]</text>
<text>LATEST_REFERRAL_TASK_NAME</text>
</outputEntry>
<outputEntry id="LiteralExpression_0iaqh1t">
<text></text>
Expand Down Expand Up @@ -488,8 +491,7 @@ else null</text>
<text>"ReviewReferralResponseAdmin"</text>
</outputEntry>
<outputEntry id="LiteralExpression_0qcsldu">
<text>"Review Referral Response - "
+ sort(flatten(additionalData.Data.referralCollection[value.referralReplyCollection!=null].value.referralReplyCollection), function(x,y) date and time(if(x.value.replyDateTime!=null)then x.value.replyDateTime else "2023-01-01T00:00:00.000") &gt; date and time(if(y.value.replyDateTime!=null)then y.value.replyDateTime else "2023-01-01T00:00:00.000")).value.referralSubject[1]</text>
<text>LATEST_REFERRAL_REPLY_TASK_NAME</text>
</outputEntry>
<outputEntry id="LiteralExpression_0kmxycv">
<text></text>
Expand Down Expand Up @@ -536,8 +538,7 @@ else null</text>
<text>"ReviewReferralResponseJudiciary"</text>
</outputEntry>
<outputEntry id="LiteralExpression_08j7d7p">
<text>"Review Referral Response - "
+ sort(flatten(additionalData.Data.referralCollection[value.referralReplyCollection!=null].value.referralReplyCollection), function(x,y) date and time(if(x.value.replyDateTime!=null)then x.value.replyDateTime else "2023-01-01T00:00:00.000") &gt; date and time(if(y.value.replyDateTime!=null)then y.value.replyDateTime else "2023-01-01T00:00:00.000")).value.referralSubject[1]</text>
<text>LATEST_REFERRAL_REPLY_TASK_NAME</text>
</outputEntry>
<outputEntry id="LiteralExpression_0zcsqzi">
<text></text>
Expand Down Expand Up @@ -584,8 +585,7 @@ else null</text>
<text>"ReviewReferralResponseLegalOps"</text>
</outputEntry>
<outputEntry id="LiteralExpression_03wz7tv">
<text>"Review Referral Response - "
+ sort(flatten(additionalData.Data.referralCollection[value.referralReplyCollection!=null].value.referralReplyCollection), function(x,y) date and time(if(x.value.replyDateTime!=null)then x.value.replyDateTime else "2023-01-01T00:00:00.000") &gt; date and time(if(y.value.replyDateTime!=null)then y.value.replyDateTime else "2023-01-01T00:00:00.000")).value.referralSubject[1]</text>
<text>LATEST_REFERRAL_REPLY_TASK_NAME</text>
</outputEntry>
<outputEntry id="LiteralExpression_14hvioj">
<text></text>
Expand Down Expand Up @@ -1545,11 +1545,58 @@ else null</text>
</rule>
</decisionTable>
</decision>
<decision id="Decision_1xqgkq6" name="Latest Referral - Task Name">
<variable id="InformationItem_10nuodq" name="LATEST_REFERRAL_TASK_NAME" typeRef="string" />
<literalExpression id="LiteralExpression_0l31qx1">
<text>if(additionalData!=null
and additionalData.Data!=null
and additionalData.Data.referralCollection!=null
and count(additionalData.Data.referralCollection) &gt; 0)
then
"Review Referral #"
+ sort(additionalData.Data.referralCollection, function(x,y) number(x.value.referralNumber) &gt; number(y.value.referralNumber))[1].value.referralNumber
+ " - "
+ sort(additionalData.Data.referralCollection, function(x,y) number(x.value.referralNumber) &gt; number(y.value.referralNumber))[1].value.referralSubject
else null</text>
</literalExpression>
</decision>
<decision id="Decision_1merw3p" name="Latest Referral Reply - Task Name">
<variable id="InformationItem_0z7m2qk" name="LATEST_REFERRAL_REPLY_TASK_NAME" typeRef="string" />
<literalExpression id="LiteralExpression_11rmzca">
<text>if(additionalData!=null
and additionalData.Data!=null
and additionalData.Data.referralCollection!=null
and count(additionalData.Data.referralCollection[count(value.referralReplyCollection)&gt;0])&gt;0)
then
"Review Referral #"
+ sort(flatten(additionalData.Data.referralCollection[value.referralReplyCollection!=null].value.referralReplyCollection), function(x,y) date and time(if(x.value.replyDateTime!=null)then x.value.replyDateTime else "2023-01-01T00:00:00.000") &gt; date and time(if(y.value.replyDateTime!=null)then y.value.replyDateTime else "2023-01-01T00:00:00.000"))[1].value.referralNumber
+ " - "
+ sort(flatten(additionalData.Data.referralCollection[value.referralReplyCollection!=null].value.referralReplyCollection), function(x,y) date and time(if(x.value.replyDateTime!=null)then x.value.replyDateTime else "2023-01-01T00:00:00.000") &gt; date and time(if(y.value.replyDateTime!=null)then y.value.replyDateTime else "2023-01-01T00:00:00.000"))[1].value.referralSubject
+ " Response"
else null</text>
</literalExpression>
</decision>
<dmndi:DMNDI>
<dmndi:DMNDiagram id="DMNDiagram_0b2rkcb">
<dmndi:DMNShape id="DMNShape_0wc7glt" dmnElementRef="wa-task-initiation-employment-et_scotland">
<dc:Bounds height="80" width="180" x="150" y="80" />
</dmndi:DMNShape>
<dmndi:DMNEdge id="DMNEdge_1srd5ad" dmnElementRef="InformationRequirement_1l2v2xj">
<di:waypoint x="240" y="300" />
<di:waypoint x="210" y="180" />
<di:waypoint x="210" y="160" />
</dmndi:DMNEdge>
<dmndi:DMNShape id="DMNShape_1bykp81" dmnElementRef="Decision_1xqgkq6">
<dc:Bounds height="80" width="180" x="150" y="300" />
</dmndi:DMNShape>
<dmndi:DMNEdge id="DMNEdge_0q240ep" dmnElementRef="InformationRequirement_05r15im">
<di:waypoint x="480" y="300" />
<di:waypoint x="270" y="180" />
<di:waypoint x="270" y="160" />
</dmndi:DMNEdge>
<dmndi:DMNShape id="DMNShape_0baejpx" dmnElementRef="Decision_1merw3p">
<dc:Bounds height="80" width="180" x="390" y="300" />
</dmndi:DMNShape>
</dmndi:DMNDiagram>
</dmndi:DMNDI>
</definitions>
Loading