Skip to content

Commit

Permalink
CIV-12646 changes (#865)
Browse files Browse the repository at this point in the history
Co-authored-by: Raja Mani <[email protected]>
  • Loading branch information
kalachandrasekar1 and rajakm authored Feb 19, 2024
1 parent 586b1d2 commit 4d3ee51
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 6 deletions.
46 changes: 40 additions & 6 deletions src/main/resources/camunda/create_lip_claim.bpmn
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_0rn46su" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.14.0">
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_0rn46su" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.9.0">
<bpmn:message id="Message_0slk3de" name="CREATE_CLAIM" />
<bpmn:error id="Error_0t2ju7k" name="StartBusinessAbort" errorCode="ABORT" />
<bpmn:error id="Error_1237qii" name="StartBusinessAbort" errorCode="ABORT" />
Expand Down Expand Up @@ -68,19 +68,31 @@
<bpmn:extensionElements>
<camunda:in variables="all" />
</bpmn:extensionElements>
<bpmn:incoming>Flow_0ad6bt0</bpmn:incoming>
<bpmn:outgoing>Flow_17vsjp4</bpmn:outgoing>
</bpmn:callActivity>
<bpmn:sequenceFlow id="Flow_06x85j3" sourceRef="GenerateDraftForm" targetRef="CreateServiceRequestCUI" />
<bpmn:sequenceFlow id="Flow_06x85j3" sourceRef="GenerateDraftForm" targetRef="Gateway_0w83mdr" />
<bpmn:sequenceFlow id="Flow_1hi4tb8" name="No" sourceRef="Gateway_0w83mdr" targetRef="CreateServiceRequestCUI">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${empty flowFlags.CLAIM_ISSUE_HWF|| !flowFlags.CLAIM_ISSUE_HWF}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:serviceTask id="CreateServiceRequestCUI" name="Service Request CUI" camunda:type="external" camunda:topic="processCaseEvent">
<bpmn:extensionElements>
<camunda:inputOutput>
<camunda:inputParameter name="caseEvent">CREATE_SERVICE_REQUEST_CUI_CLAIM_ISSUE</camunda:inputParameter>
</camunda:inputOutput>
</bpmn:extensionElements>
<bpmn:incoming>Flow_1f9xfbw</bpmn:incoming>
<bpmn:incoming>Flow_06x85j3</bpmn:incoming>
<bpmn:incoming>Flow_1hi4tb8</bpmn:incoming>
<bpmn:outgoing>Flow_0012tae</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:exclusiveGateway id="Gateway_0w83mdr" name="Is HelpwithFee?">
<bpmn:incoming>Flow_06x85j3</bpmn:incoming>
<bpmn:outgoing>Flow_1hi4tb8</bpmn:outgoing>
<bpmn:outgoing>Flow_0ad6bt0</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_0ad6bt0" name="Yes" sourceRef="Gateway_0w83mdr" targetRef="Activity_19rrcw0">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${!empty flowFlags.CLAIM_ISSUE_HWF&amp;&amp; flowFlags.CLAIM_ISSUE_HWF}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateClaim">
Expand Down Expand Up @@ -119,9 +131,15 @@
<dc:Bounds x="1280" y="350" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1cbdfi6_di" bpmnElement="CreateServiceRequestCUI">
<dc:Bounds x="1122" y="362" width="36" height="36" />
<dc:Bounds x="1172" y="362" width="36" height="36" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="BPMNShape_0q7qu0a" bpmnElement="Gateway_0w83mdr" isMarkerVisible="true">
<dc:Bounds x="1065" y="355" width="50" height="50" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1051" y="343" width="79" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0x002k6_di" bpmnElement="Event_0x002k6">
<dc:Bounds x="452" y="322" width="36" height="36" />
<bpmndi:BPMNLabel>
Expand Down Expand Up @@ -155,12 +173,28 @@
<di:waypoint x="920" y="380" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0012tae_di" bpmnElement="Flow_0012tae">
<di:waypoint x="1158" y="380" />
<di:waypoint x="1208" y="380" />
<di:waypoint x="1280" y="380" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_06x85j3_di" bpmnElement="Flow_06x85j3">
<di:waypoint x="1020" y="380" />
<di:waypoint x="1122" y="380" />
<di:waypoint x="1065" y="380" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1hi4tb8_di" bpmnElement="Flow_1hi4tb8">
<di:waypoint x="1115" y="380" />
<di:waypoint x="1172" y="380" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1137" y="362" width="15" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0ad6bt0_di" bpmnElement="Flow_0ad6bt0">
<di:waypoint x="1090" y="405" />
<di:waypoint x="1090" y="480" />
<di:waypoint x="1320" y="480" />
<di:waypoint x="1320" y="430" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1121" y="462" width="18" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import org.camunda.bpm.engine.variable.Variables;
import org.junit.jupiter.api.Test;

import java.util.Map;

public class CreateClaimLipTest extends BpmnBaseTest {

private static final String FILE_NAME = "create_lip_claim.bpmn";
Expand Down Expand Up @@ -32,6 +34,8 @@ public CreateClaimLipTest() {
void shouldSuccessfullyCreateLipClaim() {
assertProcessStartedWithMessage(MESSAGE_NAME, PROCESS_ID);
VariableMap variables = Variables.createVariables();
variables.put(FLOW_FLAGS, Map.of(
"CLAIM_ISSUE_HWF", false));
startBusinessProcess(variables);
completeClaimIssue(variables);
notifyApplicant1ClaimSubmitted(variables);
Expand All @@ -40,6 +44,19 @@ void shouldSuccessfullyCreateLipClaim() {
completeBusinessProcess(assertNextExternalTask(END_BUSINESS_PROCESS));
}

@Test
void shouldPauseServiceRequestApiCall_WhenHwFApplied() {
assertProcessStartedWithMessage(MESSAGE_NAME, PROCESS_ID);
VariableMap variables = Variables.createVariables();
variables.put(FLOW_FLAGS, Map.of(
"CLAIM_ISSUE_HWF", true));
startBusinessProcess(variables);
completeClaimIssue(variables);
notifyApplicant1ClaimSubmitted(variables);
generateDraftForm(variables);
completeBusinessProcess(assertNextExternalTask(END_BUSINESS_PROCESS));
}

private void completeClaimIssue(final VariableMap variables) {

//complete the applicant assignment
Expand Down

0 comments on commit 4d3ee51

Please sign in to comment.