Skip to content

Commit

Permalink
DTSCCI-1527 - Updated test and Camunda diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
guygrewal77 committed Feb 3, 2025
1 parent c44cdbb commit 28b3126
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 26 deletions.
15 changes: 9 additions & 6 deletions src/main/resources/camunda/claim_dismissed.bpmn
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
</bpmn:boundaryEvent>
<bpmn:sequenceFlow id="Flow_0yvpi10" sourceRef="Event_1fn0bf1" targetRef="Event_1nsmt51" />
<bpmn:sequenceFlow id="Flow_08myj65" sourceRef="Event_0t2zome" targetRef="Activity_0emdthr" />
<bpmn:serviceTask id="ClaimDismissedNotify1V2Parties" name="Notify relevant parties" camunda:type="external" camunda:topic="processCaseEvent">
<bpmn:serviceTask id="ClaimDismissedNotifyParties" name="Notify relevant parties" camunda:type="external" camunda:topic="processCaseEvent">
<bpmn:extensionElements>
<camunda:inputOutput>
<camunda:inputParameter name="caseEvent">NOTIFY_1V2_PARTIES_FOR_CLAIM_DISMISSED</camunda:inputParameter>
<camunda:inputParameter name="caseEvent">NOTIFY_PARTIES_FOR_CLAIM_DISMISSED</camunda:inputParameter>
</camunda:inputOutput>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0bca286</bpmn:incoming>
Expand Down Expand Up @@ -81,11 +81,11 @@
<bpmn:outgoing>Flow_0o65a0g</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:sequenceFlow id="Flow_1im5p4o" sourceRef="UpdateGeneralApplicationStatus" targetRef="UpdateClaimWithApplicationStatus" />
<bpmn:sequenceFlow id="Flow_0urkbiq" sourceRef="ClaimDismissedNotify1V2Parties" targetRef="NotifyRoboticsOnCaseHandedOffline" />
<bpmn:sequenceFlow id="Flow_0bca286" name="Case does not have General Application(s)" sourceRef="Gateway_14yvrwf" targetRef="ClaimDismissedNotify1V2Parties">
<bpmn:sequenceFlow id="Flow_0urkbiq" sourceRef="ClaimDismissedNotifyParties" targetRef="NotifyRoboticsOnCaseHandedOffline" />
<bpmn:sequenceFlow id="Flow_0bca286" name="Case does not have General Application(s)" sourceRef="Gateway_14yvrwf" targetRef="ClaimDismissedNotifyParties">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${empty flowFlags.GENERAL_APPLICATION_ENABLED || !flowFlags.GENERAL_APPLICATION_ENABLED}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_0o65a0g" sourceRef="UpdateClaimWithApplicationStatus" targetRef="ClaimDismissedNotify1V2Parties" />
<bpmn:sequenceFlow id="Flow_0o65a0g" sourceRef="UpdateClaimWithApplicationStatus" targetRef="ClaimDismissedNotifyParties" />
</bpmn:process>
<bpmn:message id="Message_0slk3de" name="DISMISS_CLAIM" />
<bpmn:error id="Error_0t2ju7k" name="StartBusinessAbort" errorCode="ABORT" />
Expand All @@ -112,7 +112,7 @@
<bpmndi:BPMNShape id="Activity_0m7yww1_di" bpmnElement="UpdateClaimWithApplicationStatus">
<dc:Bounds x="790" y="90" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1n01tzr_di" bpmnElement="ClaimDismissedNotify1V2Parties">
<bpmndi:BPMNShape id="Activity_1n01tzr_di" bpmnElement="ClaimDismissedNotifyParties">
<dc:Bounds x="1040" y="220" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
Expand Down Expand Up @@ -179,6 +179,9 @@
<di:waypoint x="890" y="130" />
<di:waypoint x="1090" y="130" />
<di:waypoint x="1090" y="220" />
<bpmndi:BPMNLabel>
<dc:Bounds x="947" y="96" width="89" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ void shouldNotifyApplicantSolicitor_whenPastClaimNotificationDeadline() {
assertCompleteExternalTask(
applicantNotification,
PROCESS_CASE_EVENT,
"NOTIFY_APPLICANT_SOLICITOR1_FOR_CLAIM_DISMISSED",
"ClaimDismissedNotifyApplicantSolicitor1"
"NOTIFY_PARTIES_FOR_CLAIM_DISMISSED",
"ClaimDismissedNotifyParties"
);

//complete the RPA notification
Expand All @@ -77,7 +77,7 @@ void shouldNotifyApplicantSolicitor_whenPastClaimNotificationDeadline() {
}

@Test
void shouldNotifyApplicantSolicitor_whenPastClaimDetailsNotificationDeadline() {
void shouldNotifyRelevantParties_whenPastClaimDetailsNotificationDeadline() {
//assert process has started
assertFalse(processInstance.isEnded());

Expand All @@ -103,8 +103,8 @@ void shouldNotifyApplicantSolicitor_whenPastClaimDetailsNotificationDeadline() {
assertCompleteExternalTask(
applicantNotification,
PROCESS_CASE_EVENT,
"NOTIFY_APPLICANT_SOLICITOR1_FOR_CLAIM_DISMISSED",
"ClaimDismissedNotifyApplicantSolicitor1"
"NOTIFY_PARTIES_FOR_CLAIM_DISMISSED",
"ClaimDismissedNotifyParties"
);

//Notify RPA - Handed Offline
Expand Down Expand Up @@ -146,13 +146,13 @@ void shouldNotifyAllParties_whenPastClaimDismissedDeadline() {
variables
);

//complete the notification to 1v2 parties
ExternalTask oneVTwopartiesNotification = assertNextExternalTask(PROCESS_CASE_EVENT);
//complete the notification to relevant parties
ExternalTask relevantPartiesNotification = assertNextExternalTask(PROCESS_CASE_EVENT);
assertCompleteExternalTask(
oneVTwopartiesNotification,
relevantPartiesNotification,
PROCESS_CASE_EVENT,
"NOTIFY_1V2_PARTIES_FOR_CLAIM_DISMISSED",
"ClaimDismissedNotify1V2Parties"
"NOTIFY_PARTIES_FOR_CLAIM_DISMISSED",
"ClaimDismissedNotifyParties"
);

//complete the RPA notification
Expand All @@ -172,15 +172,14 @@ void shouldNotifyAllParties_whenPastClaimDismissedDeadline() {
}

@Test
void shouldNotifyApplicantSolicitor_whenPastClaimNotificationDeadline_GAEnabled() {
void shouldNotifyRelevantParties_whenPastClaimNotificationDeadline_GAEnabled() {
//assert process has started
assertFalse(processInstance.isEnded());

//assert message start event
assertThat(getProcessDefinitionByMessage(MESSAGE_NAME).getKey()).isEqualTo(PROCESS_ID);

VariableMap variables = Variables.createVariables();
variables.putValue("flowState", "MAIN.CLAIM_DISMISSED_PAST_CLAIM_NOTIFICATION_DEADLINE");
variables.putValue("flowFlags", Map.of("GENERAL_APPLICATION_ENABLED", true));

//complete the start business process
Expand Down Expand Up @@ -216,8 +215,8 @@ void shouldNotifyApplicantSolicitor_whenPastClaimNotificationDeadline_GAEnabled(
assertCompleteExternalTask(
applicantNotification,
PROCESS_CASE_EVENT,
"NOTIFY_APPLICANT_SOLICITOR1_FOR_CLAIM_DISMISSED",
"ClaimDismissedNotifyApplicantSolicitor1"
"NOTIFY_PARTIES_FOR_CLAIM_DISMISSED",
"ClaimDismissedNotifyParties"
);

//complete the RPA notification
Expand All @@ -237,7 +236,7 @@ void shouldNotifyApplicantSolicitor_whenPastClaimNotificationDeadline_GAEnabled(
}

@Test
void shouldNotifyApplicantSolicitor_whenPastClaimDetailsNotificationDeadline_GAEnabled() {
void shouldNotifyRelevantParties_whenPastClaimDetailsNotificationDeadline_GAEnabled() {
//assert process has started
assertFalse(processInstance.isEnded());

Expand Down Expand Up @@ -281,8 +280,8 @@ void shouldNotifyApplicantSolicitor_whenPastClaimDetailsNotificationDeadline_GAE
assertCompleteExternalTask(
applicantNotification,
PROCESS_CASE_EVENT,
"NOTIFY_APPLICANT_SOLICITOR1_FOR_CLAIM_DISMISSED",
"ClaimDismissedNotifyApplicantSolicitor1"
"NOTIFY_PARTIES_FOR_CLAIM_DISMISSED",
"ClaimDismissedNotifyParties"
);

//complete the RPA notification
Expand Down Expand Up @@ -324,13 +323,13 @@ void shouldNotifyAllParties_whenPastClaimDismissedDeadline_GAEnabled() {
variables
);

//complete the notification to 1v2 parties
//complete the notification to relevant parties
ExternalTask oneVTwoPartiesNotification = assertNextExternalTask(PROCESS_CASE_EVENT);
assertCompleteExternalTask(
oneVTwoPartiesNotification,
PROCESS_CASE_EVENT,
"NOTIFY_1V2_PARTIES_FOR_CLAIM_DISMISSED",
"ClaimDismissedNotify1V2Parties"
"NOTIFY_PARTIES_FOR_CLAIM_DISMISSED",
"ClaimDismissedNotifyParties"
);

//complete the RPA notification
Expand Down

0 comments on commit 28b3126

Please sign in to comment.