Skip to content

Commit

Permalink
CIV-14595 adding tasks for claimant and defendant dashboard notificat…
Browse files Browse the repository at this point in the history
…ion (#1048)

* CIV-14593 new BPM to send notification after bundle is stitched

* CIV-14593 checkstyle error

* CIV-14595 adding tasks for claimant and defendant dashboard notification

* CIV-14595 checkstyle error

---------

Co-authored-by: marianadpereira <[email protected]>
  • Loading branch information
kannan-v-hmcts and marianadpereira authored Aug 8, 2024
1 parent 519daa2 commit b786a88
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 10 deletions.
56 changes: 46 additions & 10 deletions src/main/resources/camunda/amend_restitch_bundle.bpmn
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</camunda:properties>
<camunda:in variables="all" />
</bpmn:extensionElements>
<bpmn:incoming>Flow_1xckrvu5445</bpmn:incoming>
<bpmn:incoming>Flow_0qh9s34</bpmn:incoming>
<bpmn:outgoing>Flow_5845212254</bpmn:outgoing>
</bpmn:callActivity>
<bpmn:callActivity id="Activity_7842144454" name="Start Business Process" calledElement="StartBusinessProcess">
Expand Down Expand Up @@ -53,10 +53,30 @@
</camunda:inputOutput>
</bpmn:extensionElements>
<bpmn:incoming>Flow_1fxs0vt25554</bpmn:incoming>
<bpmn:outgoing>Flow_1xckrvu5445</bpmn:outgoing>
<bpmn:outgoing>Flow_1xckrvu544555</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:sequenceFlow id="Flow_1xckrvu5445" sourceRef="NotifyDefendantAmendRestitchBundle" targetRef="Activity_120199855" />
<bpmn:sequenceFlow id="Flow_1xckrvu544555" sourceRef="NotifyDefendantAmendRestitchBundle" targetRef="CreateAmendRestitchBundleDashboardNotificationsForClaimant" />
<bpmn:sequenceFlow id="Flow_1fxs0vt25554" sourceRef="NotifyClaimantAmendRestitchBundle" targetRef="NotifyDefendantAmendRestitchBundle" />
<bpmn:serviceTask id="CreateAmendRestitchBundleDashboardNotificationsForClaimant" name="Create Dashboard Notification For Claimant" camunda:type="external" camunda:topic="processCaseEvent">
<bpmn:extensionElements>
<camunda:inputOutput>
<camunda:inputParameter name="caseEvent">CREATE_DASHBOARD_NOTIFICATION_AMEND_RESTITCH_BUNDLE_CLAIMANT</camunda:inputParameter>
</camunda:inputOutput>
</bpmn:extensionElements>
<bpmn:incoming>Flow_1xckrvu544555</bpmn:incoming>
<bpmn:outgoing>Flow_1qw3fa2545</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:sequenceFlow id="Flow_1qw3fa2545" sourceRef="CreateAmendRestitchBundleDashboardNotificationsForClaimant" targetRef="CreateAmendRestitchBundleDashboardNotificationsForDefendant" />
<bpmn:serviceTask id="CreateAmendRestitchBundleDashboardNotificationsForDefendant" name="Create Dashboard Notification For Defendant" camunda:type="external" camunda:topic="processCaseEvent">
<bpmn:extensionElements>
<camunda:inputOutput>
<camunda:inputParameter name="caseEvent">CREATE_DASHBOARD_NOTIFICATION_AMEND_RESTITCH_BUNDLE_DEFENDANT</camunda:inputParameter>
</camunda:inputOutput>
</bpmn:extensionElements>
<bpmn:incoming>Flow_1qw3fa2545</bpmn:incoming>
<bpmn:outgoing>Flow_0qh9s34</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:sequenceFlow id="Flow_0qh9s34" sourceRef="CreateAmendRestitchBundleDashboardNotificationsForDefendant" targetRef="Activity_120199855" />
</bpmn:process>
<bpmn:error id="Error_0lou1w7" name="StartBusinessAbort" errorCode="ABORT" />
<bpmn:message id="Message_07sm7e9" name="AMEND_RESTITCH_BUNDLE" />
Expand All @@ -83,10 +103,18 @@
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_1h61h5s_di" bpmnElement="Event_878884254">
<dc:Bounds x="942" y="189" width="36" height="36" />
<dc:Bounds x="1382" y="189" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="BPMNShape_0qwga33" bpmnElement="CreateAmendRestitchBundleDashboardNotificationsForDefendant">
<dc:Bounds x="990" y="167" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="BPMNShape_1qfub25" bpmnElement="CreateAmendRestitchBundleDashboardNotificationsForClaimant">
<dc:Bounds x="810" y="167" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1j68eid_di" bpmnElement="Activity_120199855">
<dc:Bounds x="820" y="167" width="100" height="80" />
<dc:Bounds x="1180" y="167" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0kza4it_di" bpmnElement="Event_0kza4it">
<dc:Bounds x="262" y="149" width="36" height="36" />
Expand All @@ -95,8 +123,8 @@
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_0x2wz2v_di" bpmnElement="Flow_5845212254">
<di:waypoint x="920" y="207" />
<di:waypoint x="942" y="207" />
<di:waypoint x="1280" y="207" />
<di:waypoint x="1382" y="207" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1y0ic2q_di" bpmnElement="Flow_778754554">
<di:waypoint x="280" y="149" />
Expand All @@ -110,14 +138,22 @@
<di:waypoint x="330" y="207" />
<di:waypoint x="420" y="207" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1xckrvu_di" bpmnElement="Flow_1xckrvu5445">
<di:waypoint x="710" y="207" />
<di:waypoint x="820" y="204" />
<bpmndi:BPMNEdge id="Flow_1xckrvu_di" bpmnElement="Flow_1xckrvu544555">
<di:waypoint x="710" y="208" />
<di:waypoint x="810" y="207" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1fxs0vt_di" bpmnElement="Flow_1fxs0vt25554">
<di:waypoint x="520" y="207" />
<di:waypoint x="610" y="207" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1qw3fa2_di" bpmnElement="Flow_1qw3fa2545">
<di:waypoint x="910" y="207" />
<di:waypoint x="990" y="207" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0qh9s34_di" bpmnElement="Flow_0qh9s34">
<di:waypoint x="1090" y="205" />
<di:waypoint x="1180" y="203" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ public class AmendRestitchBundleTest extends BpmnBaseTest {
private static final String NOTIFY_DEFENDANT_AMEND_RESTITCH_BUNDLE_ACTIVITY_ID
= "NotifyDefendantAmendRestitchBundle";

public static final String CREATE_DASHBOARD_NOTIFICATION_AMEND_RESTITCH_BUNDLE_CLAIMANT
= "CREATE_DASHBOARD_NOTIFICATION_AMEND_RESTITCH_BUNDLE_CLAIMANT";
public static final String CREATE_DASHBOARD_NOTIFICATION_AMEND_RESTITCH_BUNDLE_DEFENDANT
= "CREATE_DASHBOARD_NOTIFICATION_AMEND_RESTITCH_BUNDLE_DEFENDANT";

//ACTIVITY IDs
private static final String CREATE_DASHBOARD_NOTIFICATION_AMEND_RESTITCH_BUNDLE_CLAIMANT_ACTIVITY_ID
= "CreateAmendRestitchBundleDashboardNotificationsForClaimant";
private static final String CREATE_DASHBOARD_NOTIFICATION_AMEND_RESTITCH_BUNDLE_DEFENDANT_ACTIVITY_ID
= "CreateAmendRestitchBundleDashboardNotificationsForDefendant";

public AmendRestitchBundleTest() {
super("amend_restitch_bundle.bpmn", PROCESS_ID);
}
Expand Down Expand Up @@ -70,6 +81,22 @@ void shouldSuccessfullyCompleteAmendRestitchBundle() {
variables
);

//complete the claimant dashboard notification
notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT);
assertCompleteExternalTask(notificationTask, PROCESS_CASE_EVENT,
CREATE_DASHBOARD_NOTIFICATION_AMEND_RESTITCH_BUNDLE_CLAIMANT,
CREATE_DASHBOARD_NOTIFICATION_AMEND_RESTITCH_BUNDLE_CLAIMANT_ACTIVITY_ID,
variables
);

//complete the defendant dashboard notification
notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT);
assertCompleteExternalTask(notificationTask, PROCESS_CASE_EVENT,
CREATE_DASHBOARD_NOTIFICATION_AMEND_RESTITCH_BUNDLE_DEFENDANT,
CREATE_DASHBOARD_NOTIFICATION_AMEND_RESTITCH_BUNDLE_DEFENDANT_ACTIVITY_ID,
variables
);

//end business process
ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS);
completeBusinessProcess(endBusinessProcess);
Expand Down

0 comments on commit b786a88

Please sign in to comment.