diff options
author | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2019-03-01 14:35:36 -0500 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2019-03-01 14:37:00 -0500 |
commit | 05355bb9be67ddbed000a1ef9b64cba86c4228c1 (patch) | |
tree | b4edc09373370e7e9d80088b8f45d0e7bb3a8a31 /bpmn/so-bpmn-building-blocks/src | |
parent | 49bb3328fe6d538606ce75506314be1e91e1a7e7 (diff) |
add sdnc adapter subflow call to network update
add sdnc adapter subflow call to network update
Change-Id: I3206acb634afb5ce9247656030f82ab8064adf08
Issue-ID: SO-1585
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'bpmn/so-bpmn-building-blocks/src')
2 files changed, 37 insertions, 14 deletions
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UpdateNetworkBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UpdateNetworkBB.bpmn index b93ecf8066..1235469b42 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UpdateNetworkBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UpdateNetworkBB.bpmn @@ -6,14 +6,13 @@ </bpmn2:startEvent> <bpmn2:serviceTask id="SDNCChangeAssignNetwork" name="SDNC ChangeAssign Network" camunda:expression="${SDNCChangeAssignTasks.changeAssignNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_074w2et</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_04yezm3</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_0rvstwt</bpmn2:outgoing> </bpmn2:serviceTask> <bpmn2:sequenceFlow id="SequenceFlow_074w2et" sourceRef="UpdateNetworkBB_Start" targetRef="SDNCChangeAssignNetwork" /> <bpmn2:intermediateThrowEvent id="SDNC_End" name="To AAI"> - <bpmn2:incoming>SequenceFlow_04yezm3</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_1eacnem</bpmn2:incoming> <bpmn2:linkEventDefinition name="SDNC_to_AAI" /> </bpmn2:intermediateThrowEvent> - <bpmn2:sequenceFlow id="SequenceFlow_04yezm3" sourceRef="SDNCChangeAssignNetwork" targetRef="SDNC_End" /> <bpmn2:intermediateCatchEvent id="AAI_Start" name="To AAI"> <bpmn2:outgoing>SequenceFlow_1trqq6d</bpmn2:outgoing> <bpmn2:linkEventDefinition name="SDNC_to_AAI" /> @@ -71,6 +70,18 @@ <bpmn2:sequenceFlow id="SequenceFlow_06ei0em" sourceRef="Update_Network_AAI_ServiceTask" targetRef="UpdateNetworkBB_End" /> <bpmn2:sequenceFlow id="SequenceFlow_07hq1eg" sourceRef="Create_Network_ServiceTask" targetRef="CallActivity_NetworkAdapterRestV1" /> <bpmn2:sequenceFlow id="SequenceFlow_183ph5i" sourceRef="CallActivity_NetworkAdapterRestV1" targetRef="ServiceTask_ProcessResponse" /> + <bpmn2:callActivity id="CallActivity_sdncHandlerCallChangeAssign" name="SDNC Change Assign (network)" calledElement="SDNCHandler"> + <bpmn2:extensionElements> + <camunda:in source="SDNCRequest" target="SDNCRequest" /> + <camunda:out source="SDNCResponse" target="SDNCResponse" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:in source="mso-request-id" target="mso-request-id" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_0rvstwt</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1eacnem</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:sequenceFlow id="SequenceFlow_0rvstwt" sourceRef="SDNCChangeAssignNetwork" targetRef="CallActivity_sdncHandlerCallChangeAssign" /> + <bpmn2:sequenceFlow id="SequenceFlow_1eacnem" sourceRef="CallActivity_sdncHandlerCallChangeAssign" targetRef="SDNC_End" /> </bpmn2:process> <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" /> @@ -94,18 +105,11 @@ </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="IntermediateThrowEvent_0pce3rm_di" bpmnElement="SDNC_End"> - <dc:Bounds x="487" y="77" width="36" height="36" /> + <dc:Bounds x="665" y="77" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="490" y="117" width="33" height="12" /> + <dc:Bounds x="669" y="117" width="32" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_04yezm3_di" bpmnElement="SequenceFlow_04yezm3"> - <di:waypoint xsi:type="dc:Point" x="378" y="95" /> - <di:waypoint xsi:type="dc:Point" x="487" y="95" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="432.5" y="74" width="0" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="IntermediateCatchEvent_1hbb3j8_di" bpmnElement="AAI_Start"> <dc:Bounds x="144" y="215" width="36" height="36" /> <bpmndi:BPMNLabel> @@ -216,6 +220,23 @@ <dc:Bounds x="585" y="381" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_1da6ys0_di" bpmnElement="CallActivity_sdncHandlerCallChangeAssign"> + <dc:Bounds x="455" y="55" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0rvstwt_di" bpmnElement="SequenceFlow_0rvstwt"> + <di:waypoint xsi:type="dc:Point" x="378" y="95" /> + <di:waypoint xsi:type="dc:Point" x="455" y="95" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="416.5" y="74" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1eacnem_di" bpmnElement="SequenceFlow_1eacnem"> + <di:waypoint xsi:type="dc:Point" x="555" y="95" /> + <di:waypoint xsi:type="dc:Point" x="665" y="95" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="610" y="74" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </bpmn2:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UpdateNetworkBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UpdateNetworkBBTest.java index 5ba38a70e0..1bb065ae06 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UpdateNetworkBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UpdateNetworkBBTest.java @@ -33,10 +33,11 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class UpdateNetworkBBTest extends BaseBPMNTest { @Test public void updateNetworkBBTest() throws InterruptedException { + mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub"); ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("UpdateNetworkBB", variables); assertThat(processInstance).isNotNull(); assertThat(processInstance).isStarted().hasPassedInOrder( - "UpdateNetworkBB_Start", "SDNCChangeAssignNetwork", + "UpdateNetworkBB_Start", "SDNCChangeAssignNetwork", "CallActivity_sdncHandlerCallChangeAssign", "QueryVpnBindingAAI", "QueryNetworkPolicyAAI", "QueryNetworkTableRefAAI", "Create_Network_ServiceTask", "CallActivity_NetworkAdapterRestV1", "ServiceTask_ProcessResponse", "Update_Network_AAI_ServiceTask", "UpdateNetworkBB_End"); assertThat(processInstance).isEnded(); @@ -44,11 +45,12 @@ public class UpdateNetworkBBTest extends BaseBPMNTest { @Test public void updateNetworkBBExceptionTest() throws Exception { + mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub"); doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiQueryTasks).queryNetworkVpnBinding(any(BuildingBlockExecution.class)); ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("UpdateNetworkBB", variables); assertThat(processInstance).isStarted().hasPassedInOrder( - "UpdateNetworkBB_Start", "SDNCChangeAssignNetwork", + "UpdateNetworkBB_Start", "SDNCChangeAssignNetwork", "CallActivity_sdncHandlerCallChangeAssign", "QueryVpnBindingAAI") .hasNotPassed("QueryNetworkPolicyAAI", "QueryNetworkTableRefAAI", "UpdateNetworkAdapter", "UpdateNetworkAAI", "UpdateNetworkBB_End"); |