summaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVfModuleBB.bpmn393
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteVfModuleBBTest.java27
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/audit/AuditTasks.java11
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/common/data/TestDataSetup.java2
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/audit/AuditTasksTest.java34
5 files changed, 290 insertions, 177 deletions
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVfModuleBB.bpmn
index 33335ab2c4..ca0f8452cf 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVfModuleBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVfModuleBB.bpmn
@@ -2,13 +2,12 @@
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
<bpmn:process id="DeleteVfModuleBB" name="DeleteVfModuleBB" isExecutable="true">
<bpmn:startEvent id="DeleteVfModuleBB_Start">
- <bpmn:outgoing>SequenceFlow_1537yw5</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1oeootm</bpmn:outgoing>
</bpmn:startEvent>
- <bpmn:serviceTask id="DeleteVfModuleVnfAdapter" name="Delete Vf Module VnfAdapter" camunda:expression="${VnfAdapterDeleteTasks.deleteVfModule(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
- <bpmn:incoming>SequenceFlow_1n8gab5</bpmn:incoming>
+ <bpmn:serviceTask id="DeleteVfModuleVnfAdapter" name="Prepare Request" camunda:expression="${VnfAdapterDeleteTasks.deleteVfModule(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
+ <bpmn:incoming>SequenceFlow_028rmiu</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_08tvhtf</bpmn:outgoing>
</bpmn:serviceTask>
- <bpmn:sequenceFlow id="SequenceFlow_1537yw5" sourceRef="DeleteVfModuleBB_Start" targetRef="ExclusiveGateway_0xrgzm7" />
<bpmn:serviceTask id="UpdateVfModuleDeleteStatus" name="&#10;AAI &#10;Update&#10;(vf module)&#10;" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusDeleteVfModule(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
<bpmn:incoming>SequenceFlow_01vfwtp</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_09l7pcg</bpmn:outgoing>
@@ -70,44 +69,22 @@
<bpmn:incoming>SequenceFlow_0khqfnc</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0yuz21z</bpmn:outgoing>
</bpmn:serviceTask>
- <bpmn:sequenceFlow id="SequenceFlow_1n8gab5" sourceRef="ExclusiveGateway_0xrgzm7" targetRef="DeleteVfModuleVnfAdapter" />
- <bpmn:parallelGateway id="ExclusiveGateway_0xrgzm7">
- <bpmn:incoming>SequenceFlow_1537yw5</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1n8gab5</bpmn:outgoing>
- <bpmn:outgoing>SequenceFlow_1v3jgqe</bpmn:outgoing>
- </bpmn:parallelGateway>
- <bpmn:sequenceFlow id="SequenceFlow_032jv5j" name="Yes&#10;" sourceRef="ExclusiveGateway_1h2ystu" targetRef="Setup_Audit_Variable">
+ <bpmn:sequenceFlow id="SequenceFlow_032jv5j" name="Yes&#10;" sourceRef="auditEnabledCheck" targetRef="Setup_Audit_Variable">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("auditInventoryNeeded") == true}]]></bpmn:conditionExpression>
</bpmn:sequenceFlow>
- <bpmn:sequenceFlow id="SequenceFlow_0qfmmgt" sourceRef="Audit_Inventory" targetRef="auditSuccessfulCheck" />
<bpmn:sequenceFlow id="SequenceFlow_14bu4ys" sourceRef="ExclusiveGateway_1yvh16a" targetRef="aaiThrow" />
- <bpmn:sequenceFlow id="SequenceFlow_1mgunf3" name="No" sourceRef="ExclusiveGateway_1h2ystu" targetRef="ExclusiveGateway_1pydilb" />
<bpmn:serviceTask id="Check_Audit" name="Check Audit Variable" camunda:expression="${AuditTasks.isDeleteAuditNeeded(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
- <bpmn:incoming>SequenceFlow_1v3jgqe</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1odt2wt</bpmn:outgoing>
+ <bpmn:incoming>SequenceFlow_1oeootm</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_10af0fk</bpmn:outgoing>
</bpmn:serviceTask>
- <bpmn:sequenceFlow id="SequenceFlow_1v3jgqe" sourceRef="ExclusiveGateway_0xrgzm7" targetRef="Check_Audit" />
- <bpmn:sequenceFlow id="SequenceFlow_1odt2wt" sourceRef="Check_Audit" targetRef="ExclusiveGateway_1h2ystu" />
- <bpmn:sequenceFlow id="SequenceFlow_1swistn" sourceRef="Setup_Audit_Variable" targetRef="Audit_Inventory" />
- <bpmn:serviceTask id="Audit_Inventory" name="Audit Inventory For Delete in AAI" camunda:type="external" camunda:topic="InventoryDeleteAudit">
- <bpmn:incoming>SequenceFlow_1swistn</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0qfmmgt</bpmn:outgoing>
+ <bpmn:serviceTask id="Audit_Inventory" name="&#10;AAI&#10;Audit&#10;(vservers)&#10;" camunda:type="external" camunda:topic="InventoryDeleteAudit">
+ <bpmn:incoming>SequenceFlow_0f5ljoh</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0hpj2mm</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:serviceTask id="Setup_Audit_Variable" name="Setup Audit Variable" camunda:expression="${AuditTasks.setupAuditVariable(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
<bpmn:incoming>SequenceFlow_032jv5j</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1swistn</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1iulltd</bpmn:outgoing>
</bpmn:serviceTask>
- <bpmn:sequenceFlow id="SequenceFlow_1ut7n32" sourceRef="ExclusiveGateway_1pydilb" targetRef="ExclusiveGateway_1yvh16a" />
- <bpmn:exclusiveGateway id="ExclusiveGateway_1h2ystu" name="Audit&#10; Enabled?" default="SequenceFlow_1mgunf3">
- <bpmn:incoming>SequenceFlow_1odt2wt</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_032jv5j</bpmn:outgoing>
- <bpmn:outgoing>SequenceFlow_1mgunf3</bpmn:outgoing>
- </bpmn:exclusiveGateway>
- <bpmn:exclusiveGateway id="ExclusiveGateway_1pydilb">
- <bpmn:incoming>SequenceFlow_1mgunf3</bpmn:incoming>
- <bpmn:incoming>SequenceFlow_17cd9e2</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1ut7n32</bpmn:outgoing>
- </bpmn:exclusiveGateway>
<bpmn:subProcess id="SubProcess_0grvkj2" name="Audit Exception Sub Process" triggeredByEvent="true">
<bpmn:endEvent id="EndEvent_1gzq57j">
<bpmn:incoming>SequenceFlow_1fhst92</bpmn:incoming>
@@ -120,7 +97,7 @@
<bpmn:sequenceFlow id="SequenceFlow_1fhst92" sourceRef="ServiceTask_1isbxvo" targetRef="EndEvent_1gzq57j" />
<bpmn:startEvent id="StartEvent_1euiddy" isInterrupting="false">
<bpmn:outgoing>SequenceFlow_0xuodpy</bpmn:outgoing>
- <bpmn:escalationEventDefinition escalationRef="Escalation_130je8j" camunda:escalationCodeVariable="test" />
+ <bpmn:escalationEventDefinition escalationRef="Escalation_130je8j" camunda:escalationCodeVariable="auditCode" />
</bpmn:startEvent>
</bpmn:subProcess>
<bpmn:sequenceFlow id="SequenceFlow_179btn2" sourceRef="aaiCatch" targetRef="DeleteNetworkPolicies" />
@@ -132,19 +109,14 @@
<bpmn:outgoing>SequenceFlow_179btn2</bpmn:outgoing>
<bpmn:linkEventDefinition name="AAI" />
</bpmn:intermediateCatchEvent>
- <bpmn:sequenceFlow id="SequenceFlow_17cd9e2" name="Yes/No" sourceRef="auditSuccessfulCheck" targetRef="ExclusiveGateway_1pydilb">
+ <bpmn:sequenceFlow id="SequenceFlow_17cd9e2" name="Yes/No" sourceRef="auditSuccessfulCheck" targetRef="ExclusiveGateway_01wvywu">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("auditIsSuccessful") == false || execution.getVariable("auditIsSuccessful") == true}]]></bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_1gdyk9j" name="No" sourceRef="auditSuccessfulCheck" targetRef="EndEvent_0b0ocu0">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("auditIsSuccessful") == false}]]></bpmn:conditionExpression>
</bpmn:sequenceFlow>
- <bpmn:inclusiveGateway id="ExclusiveGateway_1yvh16a">
- <bpmn:incoming>SequenceFlow_02lpx87</bpmn:incoming>
- <bpmn:incoming>SequenceFlow_1ut7n32</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_14bu4ys</bpmn:outgoing>
- </bpmn:inclusiveGateway>
<bpmn:inclusiveGateway id="auditSuccessfulCheck" name="Audit&#10; Successful?">
- <bpmn:incoming>SequenceFlow_0qfmmgt</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0hpj2mm</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_17cd9e2</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_1gdyk9j</bpmn:outgoing>
</bpmn:inclusiveGateway>
@@ -152,6 +124,54 @@
<bpmn:incoming>SequenceFlow_1gdyk9j</bpmn:incoming>
<bpmn:escalationEventDefinition escalationRef="Escalation_130je8j" />
</bpmn:endEvent>
+ <bpmn:exclusiveGateway id="auditEnabledCheck" name="Audit&#10; Enabled?" default="SequenceFlow_1bt1p2u">
+ <bpmn:incoming>SequenceFlow_10af0fk</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_032jv5j</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1bt1p2u</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1t9q2jl">
+ <bpmn:incoming>SequenceFlow_1bt1p2u</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0dzf7hz</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1bq9g02</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_1bt1p2u" name="No" sourceRef="auditEnabledCheck" targetRef="ExclusiveGateway_1t9q2jl" />
+ <bpmn:sequenceFlow id="SequenceFlow_1oeootm" sourceRef="DeleteVfModuleBB_Start" targetRef="Check_Audit" />
+ <bpmn:sequenceFlow id="SequenceFlow_10af0fk" sourceRef="Check_Audit" targetRef="auditEnabledCheck" />
+ <bpmn:serviceTask id="aicQueryStack" name="&#10;AIC&#10;Query&#10;(stack)&#10;" camunda:type="external" camunda:topic="InventoryQueryAudit">
+ <bpmn:incoming>SequenceFlow_1iulltd</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0dzf7hz</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1iulltd" sourceRef="Setup_Audit_Variable" targetRef="aicQueryStack" />
+ <bpmn:sequenceFlow id="SequenceFlow_0dzf7hz" sourceRef="aicQueryStack" targetRef="ExclusiveGateway_1t9q2jl" />
+ <bpmn:sequenceFlow id="SequenceFlow_1bq9g02" sourceRef="ExclusiveGateway_1t9q2jl" targetRef="ExclusiveGateway_1naduhl" />
+ <bpmn:sequenceFlow id="SequenceFlow_0mtzl4z" sourceRef="ExclusiveGateway_1naduhl" targetRef="ExclusiveGateway_13fhmpf" />
+ <bpmn:sequenceFlow id="SequenceFlow_028rmiu" sourceRef="ExclusiveGateway_1naduhl" targetRef="DeleteVfModuleVnfAdapter" />
+ <bpmn:parallelGateway id="ExclusiveGateway_1naduhl">
+ <bpmn:incoming>SequenceFlow_1bq9g02</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0mtzl4z</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_028rmiu</bpmn:outgoing>
+ </bpmn:parallelGateway>
+ <bpmn:inclusiveGateway id="ExclusiveGateway_1yvh16a">
+ <bpmn:incoming>SequenceFlow_02lpx87</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_13mlz57</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_14bu4ys</bpmn:outgoing>
+ </bpmn:inclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_0hpj2mm" sourceRef="Audit_Inventory" targetRef="auditSuccessfulCheck" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_13fhmpf" name="Audit&#10; Enabled?" default="SequenceFlow_1gjwivp">
+ <bpmn:incoming>SequenceFlow_0mtzl4z</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0f5ljoh</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1gjwivp</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_0f5ljoh" name="Yes" sourceRef="ExclusiveGateway_13fhmpf" targetRef="Audit_Inventory">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("auditInventoryNeeded") == true}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_01wvywu">
+ <bpmn:incoming>SequenceFlow_17cd9e2</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1gjwivp</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_13mlz57</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_1gjwivp" name="No" sourceRef="ExclusiveGateway_13fhmpf" targetRef="ExclusiveGateway_01wvywu" />
+ <bpmn:sequenceFlow id="SequenceFlow_13mlz57" sourceRef="ExclusiveGateway_01wvywu" targetRef="ExclusiveGateway_1yvh16a" />
</bpmn:process>
<bpmn:error id="Error_0jjnve8" name="Error_3k24na6" errorCode="AAIInventoryFailure" />
<bpmn:escalation id="Escalation_130je8j" name="audit" escalationCode="audit1" />
@@ -164,40 +184,33 @@
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ServiceTask_16798zf_di" bpmnElement="DeleteVfModuleVnfAdapter">
- <dc:Bounds x="382" y="303" width="100" height="80" />
+ <dc:Bounds x="888" y="312" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1537yw5_di" bpmnElement="SequenceFlow_1537yw5">
- <di:waypoint xsi:type="dc:Point" x="195" y="284" />
- <di:waypoint xsi:type="dc:Point" x="282" y="284" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="194" y="263" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_0pbhsub_di" bpmnElement="UpdateVfModuleDeleteStatus">
<dc:Bounds x="907" y="468" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_08tvhtf_di" bpmnElement="SequenceFlow_08tvhtf">
- <di:waypoint xsi:type="dc:Point" x="482" y="343" />
- <di:waypoint xsi:type="dc:Point" x="511" y="343" />
+ <di:waypoint xsi:type="dc:Point" x="988" y="352" />
+ <di:waypoint xsi:type="dc:Point" x="1020" y="352" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="452" y="322" width="90" height="12" />
+ <dc:Bounds x="959" y="331" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="EndEvent_1rn6yvh_di" bpmnElement="DeleteVfModuleBB_End">
- <dc:Bounds x="1136" y="490" width="36" height="36" />
+ <dc:Bounds x="1268" y="490" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1109" y="530" width="90" height="0" />
+ <dc:Bounds x="1241" y="530" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="CallActivity_0whogn3_di" bpmnElement="VnfAdapter">
- <dc:Bounds x="511" y="303" width="100" height="80" />
+ <dc:Bounds x="1020" y="312" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_02lpx87_di" bpmnElement="SequenceFlow_02lpx87">
- <di:waypoint xsi:type="dc:Point" x="611" y="343" />
- <di:waypoint xsi:type="dc:Point" x="925" y="343" />
- <di:waypoint xsi:type="dc:Point" x="925" y="309" />
+ <di:waypoint xsi:type="dc:Point" x="1120" y="352" />
+ <di:waypoint xsi:type="dc:Point" x="1203" y="352" />
+ <di:waypoint xsi:type="dc:Point" x="1203" y="309" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="723" y="328" width="90" height="0" />
+ <dc:Bounds x="1116.5" y="337" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="SubProcess_11p7mrh_di" bpmnElement="SubProcess_11p7mrh" isExpanded="true">
@@ -234,9 +247,9 @@
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_09l7pcg_di" bpmnElement="SequenceFlow_09l7pcg">
<di:waypoint xsi:type="dc:Point" x="1007" y="508" />
- <di:waypoint xsi:type="dc:Point" x="1136" y="508" />
+ <di:waypoint xsi:type="dc:Point" x="1268" y="508" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1027" y="493" width="90" height="0" />
+ <dc:Bounds x="1092.5" y="493" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0xyu3pk_di" bpmnElement="SequenceFlow_0xyu3pk">
@@ -279,101 +292,29 @@
<bpmndi:BPMNShape id="ServiceTask_0v8naz9_di" bpmnElement="UpdateVfModuleContrailServiceInstanceFqdn">
<dc:Bounds x="654" y="468" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1n8gab5_di" bpmnElement="SequenceFlow_1n8gab5">
- <di:waypoint xsi:type="dc:Point" x="307" y="309" />
- <di:waypoint xsi:type="dc:Point" x="307" y="343" />
- <di:waypoint xsi:type="dc:Point" x="382" y="343" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="277" y="320" width="90" height="13" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ParallelGateway_18x6mx2_di" bpmnElement="ExclusiveGateway_0xrgzm7">
- <dc:Bounds x="282" y="259" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="262" y="312" width="90" height="13" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_032jv5j_di" bpmnElement="SequenceFlow_032jv5j">
- <di:waypoint xsi:type="dc:Point" x="492" y="174" />
- <di:waypoint xsi:type="dc:Point" x="492" y="133" />
- <di:waypoint xsi:type="dc:Point" x="531" y="133" />
+ <di:waypoint xsi:type="dc:Point" x="397" y="259" />
+ <di:waypoint xsi:type="dc:Point" x="397" y="214" />
+ <di:waypoint xsi:type="dc:Point" x="444" y="214" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="499" y="139" width="19" height="24" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0qfmmgt_di" bpmnElement="SequenceFlow_0qfmmgt">
- <di:waypoint xsi:type="dc:Point" x="754" y="133" />
- <di:waypoint xsi:type="dc:Point" x="780" y="133" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="722" y="111.5" width="90" height="13" />
+ <dc:Bounds x="405.5348837209302" y="217.95121951219514" width="19" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_14bu4ys_di" bpmnElement="SequenceFlow_14bu4ys">
- <di:waypoint xsi:type="dc:Point" x="950" y="284" />
- <di:waypoint xsi:type="dc:Point" x="1100" y="283" />
+ <di:waypoint xsi:type="dc:Point" x="1228" y="284" />
+ <di:waypoint xsi:type="dc:Point" x="1323" y="284" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="980" y="262" width="90" height="13" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1mgunf3_di" bpmnElement="SequenceFlow_1mgunf3">
- <di:waypoint xsi:type="dc:Point" x="492" y="224" />
- <di:waypoint xsi:type="dc:Point" x="492" y="257" />
- <di:waypoint xsi:type="dc:Point" x="868" y="257" />
- <di:waypoint xsi:type="dc:Point" x="868" y="224" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="503.9261744966443" y="237" width="14" height="12" />
+ <dc:Bounds x="1230.5" y="262.5" width="90" height="13" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_1vmz3zo_di" bpmnElement="Check_Audit">
- <dc:Bounds x="339" y="159" width="100" height="80" />
+ <dc:Bounds x="244" y="244" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1v3jgqe_di" bpmnElement="SequenceFlow_1v3jgqe">
- <di:waypoint xsi:type="dc:Point" x="307" y="259" />
- <di:waypoint xsi:type="dc:Point" x="307" y="199" />
- <di:waypoint xsi:type="dc:Point" x="339" y="199" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="277" y="223" width="90" height="13" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1odt2wt_di" bpmnElement="SequenceFlow_1odt2wt">
- <di:waypoint xsi:type="dc:Point" x="439" y="199" />
- <di:waypoint xsi:type="dc:Point" x="467" y="199" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="408" y="178" width="90" height="13" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1swistn_di" bpmnElement="SequenceFlow_1swistn">
- <di:waypoint xsi:type="dc:Point" x="631" y="133" />
- <di:waypoint xsi:type="dc:Point" x="654" y="133" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="598" y="112" width="90" height="13" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_1l8r2a6_di" bpmnElement="Audit_Inventory">
- <dc:Bounds x="654" y="93" width="100" height="80" />
+ <dc:Bounds x="930" y="117" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ServiceTask_1gttdjr_di" bpmnElement="Setup_Audit_Variable">
- <dc:Bounds x="531" y="93" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1ut7n32_di" bpmnElement="SequenceFlow_1ut7n32">
- <di:waypoint xsi:type="dc:Point" x="893" y="199" />
- <di:waypoint xsi:type="dc:Point" x="925" y="199" />
- <di:waypoint xsi:type="dc:Point" x="925" y="259" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="864" y="177.5" width="90" height="13" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ExclusiveGateway_1olwkdn_di" bpmnElement="ExclusiveGateway_1h2ystu" isMarkerVisible="true">
- <dc:Bounds x="467" y="174" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="519" y="187" width="45" height="24" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ExclusiveGateway_1d1pmqz_di" bpmnElement="ExclusiveGateway_1pydilb" isMarkerVisible="true">
- <dc:Bounds x="843" y="174" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="733" y="227" width="90" height="13" />
- </bpmndi:BPMNLabel>
+ <dc:Bounds x="444" y="174" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="SubProcess_0grvkj2_di" bpmnElement="SubProcess_0grvkj2" isExpanded="true">
<dc:Bounds x="231" y="642" width="350" height="200" />
@@ -409,9 +350,9 @@
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateThrowEvent_1sftyjz_di" bpmnElement="aaiThrow">
- <dc:Bounds x="1100" y="266" width="36" height="36" />
+ <dc:Bounds x="1323" y="266" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1092" y="305" width="55" height="12" />
+ <dc:Bounds x="1315" y="305" width="55" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="IntermediateCatchEvent_13y483m_di" bpmnElement="aaiCatch">
@@ -421,30 +362,26 @@
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_17cd9e2_di" bpmnElement="SequenceFlow_17cd9e2">
- <di:waypoint xsi:type="dc:Point" x="830" y="133" />
- <di:waypoint xsi:type="dc:Point" x="868" y="133" />
- <di:waypoint xsi:type="dc:Point" x="868" y="174" />
+ <di:waypoint xsi:type="dc:Point" x="1108" y="157" />
+ <di:waypoint xsi:type="dc:Point" x="1156" y="157" />
+ <di:waypoint xsi:type="dc:Point" x="1156" y="189" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="830" y="114" width="36" height="12" />
+ <dc:Bounds x="1111.0434782608695" y="137" width="36" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1gdyk9j_di" bpmnElement="SequenceFlow_1gdyk9j">
- <di:waypoint xsi:type="dc:Point" x="805" y="108" />
- <di:waypoint xsi:type="dc:Point" x="805" y="56" />
+ <di:waypoint xsi:type="dc:Point" x="1083" y="132" />
+ <di:waypoint xsi:type="dc:Point" x="1083" y="109" />
+ <di:waypoint xsi:type="dc:Point" x="1083" y="109" />
+ <di:waypoint xsi:type="dc:Point" x="1083" y="84" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="812" y="77" width="14" height="12" />
+ <dc:Bounds x="1083" y="110.74468085106383" width="14" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="InclusiveGateway_0cjvlht_di" bpmnElement="ExclusiveGateway_1yvh16a">
- <dc:Bounds x="900" y="259" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="879" y="312" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="InclusiveGateway_0i6rdd1_di" bpmnElement="auditSuccessfulCheck">
- <dc:Bounds x="780" y="108" width="50" height="50" />
+ <dc:Bounds x="1058" y="132" width="50" height="50" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="775" y="162" width="60" height="24" />
+ <dc:Bounds x="1053" y="186" width="60" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="StartEvent_04qhoba_di" bpmnElement="StartEvent_1euiddy">
@@ -454,11 +391,143 @@
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="EndEvent_1onxfk1_di" bpmnElement="EndEvent_0b0ocu0">
- <dc:Bounds x="787" y="20" width="36" height="36" />
+ <dc:Bounds x="1065" y="48" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1024" y="87" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_05scr6c_di" bpmnElement="auditEnabledCheck" isMarkerVisible="true">
+ <dc:Bounds x="371.6051332675222" y="259" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="421" y="272" width="45" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1t9q2jl_di" bpmnElement="ExclusiveGateway_1t9q2jl" isMarkerVisible="true">
+ <dc:Bounds x="697" y="259" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="677" y="313" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1bt1p2u_di" bpmnElement="SequenceFlow_1bt1p2u">
+ <di:waypoint xsi:type="dc:Point" x="397" y="309" />
+ <di:waypoint xsi:type="dc:Point" x="397" y="352" />
+ <di:waypoint xsi:type="dc:Point" x="722" y="352" />
+ <di:waypoint xsi:type="dc:Point" x="722" y="309" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="407" y="326" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1oeootm_di" bpmnElement="SequenceFlow_1oeootm">
+ <di:waypoint xsi:type="dc:Point" x="195" y="284" />
+ <di:waypoint xsi:type="dc:Point" x="244" y="284" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="219.5" y="263" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_10af0fk_di" bpmnElement="SequenceFlow_10af0fk">
+ <di:waypoint xsi:type="dc:Point" x="344" y="284" />
+ <di:waypoint xsi:type="dc:Point" x="372" y="284" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="358" y="263" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_1l7z1c0_di" bpmnElement="aicQueryStack">
+ <dc:Bounds x="571" y="174" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1iulltd_di" bpmnElement="SequenceFlow_1iulltd">
+ <di:waypoint xsi:type="dc:Point" x="544" y="214" />
+ <di:waypoint xsi:type="dc:Point" x="571" y="214" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="557.5" y="193" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0dzf7hz_di" bpmnElement="SequenceFlow_0dzf7hz">
+ <di:waypoint xsi:type="dc:Point" x="671" y="214" />
+ <di:waypoint xsi:type="dc:Point" x="722" y="214" />
+ <di:waypoint xsi:type="dc:Point" x="722" y="259" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="651.5" y="193" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1bq9g02_di" bpmnElement="SequenceFlow_1bq9g02">
+ <di:waypoint xsi:type="dc:Point" x="747" y="284" />
+ <di:waypoint xsi:type="dc:Point" x="796" y="284" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="726.5" y="263" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0mtzl4z_di" bpmnElement="SequenceFlow_0mtzl4z">
+ <di:waypoint xsi:type="dc:Point" x="821" y="259" />
+ <di:waypoint xsi:type="dc:Point" x="821" y="214" />
+ <di:waypoint xsi:type="dc:Point" x="846" y="214" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="791" y="231" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_028rmiu_di" bpmnElement="SequenceFlow_028rmiu">
+ <di:waypoint xsi:type="dc:Point" x="821" y="309" />
+ <di:waypoint xsi:type="dc:Point" x="821" y="352" />
+ <di:waypoint xsi:type="dc:Point" x="888" y="352" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="791" y="324.5" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ParallelGateway_1we1ooj_di" bpmnElement="ExclusiveGateway_1naduhl">
+ <dc:Bounds x="796" y="259" width="50" height="50" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="760" y="59" width="0" height="12" />
+ <dc:Bounds x="775" y="313" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="InclusiveGateway_07wvmp4_di" bpmnElement="ExclusiveGateway_1yvh16a">
+ <dc:Bounds x="1178" y="259" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1067" y="312" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0hpj2mm_di" bpmnElement="SequenceFlow_0hpj2mm">
+ <di:waypoint xsi:type="dc:Point" x="1030" y="157" />
+ <di:waypoint xsi:type="dc:Point" x="1058" y="157" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="999" y="136" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_13fhmpf_di" bpmnElement="ExclusiveGateway_13fhmpf" isMarkerVisible="true">
+ <dc:Bounds x="846" y="189" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="898" y="202" width="45" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0f5ljoh_di" bpmnElement="SequenceFlow_0f5ljoh">
+ <di:waypoint xsi:type="dc:Point" x="871" y="189" />
+ <di:waypoint xsi:type="dc:Point" x="871" y="157" />
+ <di:waypoint xsi:type="dc:Point" x="930" y="157" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="877.601615925754" y="162.89580806038546" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_01wvywu_di" bpmnElement="ExclusiveGateway_01wvywu" isMarkerVisible="true">
+ <dc:Bounds x="1131" y="189" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1111" y="243" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1gjwivp_di" bpmnElement="SequenceFlow_1gjwivp">
+ <di:waypoint xsi:type="dc:Point" x="871" y="239" />
+ <di:waypoint xsi:type="dc:Point" x="871" y="266" />
+ <di:waypoint xsi:type="dc:Point" x="1156" y="266" />
+ <di:waypoint xsi:type="dc:Point" x="1156" y="239" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="879" y="244" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_13mlz57_di" bpmnElement="SequenceFlow_13mlz57">
+ <di:waypoint xsi:type="dc:Point" x="1181" y="214" />
+ <di:waypoint xsi:type="dc:Point" x="1203" y="214" />
+ <di:waypoint xsi:type="dc:Point" x="1203" y="259" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1147" y="193" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteVfModuleBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteVfModuleBBTest.java
index d9166c9138..47d0ad9b7f 100644
--- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteVfModuleBBTest.java
+++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteVfModuleBBTest.java
@@ -46,18 +46,20 @@ public class DeleteVfModuleBBTest extends BaseBPMNTest {
mockSubprocess("VnfAdapter", "Mocked VnfAdapter", "GenericStub");
ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeleteVfModuleBB", variables);
List<LockedExternalTask> tasks = externalTaskService.fetchAndLock(100, "externalWorkerId")
- .topic("InventoryDeleteAudit", 60L * 1000L).execute();
+ .topic("InventoryDeleteAudit", 60L * 1000L).topic("InventoryQueryAudit", 60L * 1000L).execute();
while (!tasks.isEmpty()) {
for (LockedExternalTask task : tasks) {
externalTaskService.complete(task.getId(), "externalWorkerId");
}
tasks = externalTaskService.fetchAndLock(100, "externalWorkerId").topic("InventoryDeleteAudit", 60L * 1000L)
- .execute();
+ .topic("InventoryQueryAudit", 60L * 1000L).execute();
}
assertThat(pi).isNotNull();
- assertThat(pi).isStarted().hasPassed("DeleteVfModuleBB_Start", "ExclusiveGateway_0xrgzm7",
- "ExclusiveGateway_1yvh16a", "Check_Audit", "Setup_Audit_Variable", "Audit_Inventory",
- "DeleteVfModuleVnfAdapter", "VnfAdapter", "DeleteNetworkPolicies", "UpdateVnfIpv4OamAddress",
+ assertThat(pi).isStarted().hasPassed("DeleteVfModuleBB_Start", "Check_Audit", "auditEnabledCheck",
+ "Setup_Audit_Variable", "Setup_Audit_Variable", "aicQueryStack", "ExclusiveGateway_1t9q2jl",
+ "ExclusiveGateway_1naduhl", "ExclusiveGateway_13fhmpf", "DeleteVfModuleVnfAdapter", "VnfAdapter",
+ "Audit_Inventory", "ExclusiveGateway_1yvh16a", "auditSuccessfulCheck", "ExclusiveGateway_01wvywu",
+ "ExclusiveGateway_1yvh16a", "DeleteNetworkPolicies", "UpdateVnfIpv4OamAddress",
"UpdateVnfManagementV6Address", "UpdateVfModuleContrailServiceInstanceFqdn",
"UpdateVfModuleHeatStackId", "UpdateVfModuleDeleteStatus", "DeleteVfModuleBB_End");
assertThat(pi).isEnded();
@@ -68,19 +70,22 @@ public class DeleteVfModuleBBTest extends BaseBPMNTest {
doThrow(BpmnError.class).when(vnfAdapterDeleteTasks).deleteVfModule(any(BuildingBlockExecution.class));
ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeleteVfModuleBB", variables);
List<LockedExternalTask> tasks = externalTaskService.fetchAndLock(100, "externalWorkerId")
- .topic("InventoryDeleteAudit", 60L * 1000L).execute();
+ .topic("InventoryDeleteAudit", 60L * 1000L).topic("InventoryQueryAudit", 60L * 1000L).execute();
while (!tasks.isEmpty()) {
for (LockedExternalTask task : tasks) {
externalTaskService.complete(task.getId(), "externalWorkerId");
}
tasks = externalTaskService.fetchAndLock(100, "externalWorkerId").topic("InventoryDeleteAudit", 60L * 1000L)
- .execute();
+ .topic("InventoryQueryAudit", 60L * 1000L).execute();
}
assertThat(pi).isNotNull();
- assertThat(pi).isStarted().hasPassed("DeleteVfModuleBB_Start", "DeleteVfModuleVnfAdapter").hasNotPassed(
- "VnfAdapter", "DeleteNetworkPolicies", "UpdateVnfIpv4OamAddress", "UpdateVnfManagementV6Address",
- "UpdateVfModuleContrailServiceInstanceFqdn", "UpdateVfModuleHeatStackId", "UpdateVfModuleDeleteStatus",
- "DeleteVfModuleBB_End");
+ assertThat(pi).isStarted()
+ .hasPassed("DeleteVfModuleBB_Start", "Check_Audit", "auditEnabledCheck", "Setup_Audit_Variable",
+ "Setup_Audit_Variable", "aicQueryStack", "ExclusiveGateway_1t9q2jl", "ExclusiveGateway_1naduhl",
+ "ExclusiveGateway_13fhmpf")
+ .hasNotPassed("VnfAdapter", "DeleteNetworkPolicies", "UpdateVnfIpv4OamAddress",
+ "UpdateVnfManagementV6Address", "UpdateVfModuleContrailServiceInstanceFqdn",
+ "UpdateVfModuleHeatStackId", "UpdateVfModuleDeleteStatus", "DeleteVfModuleBB_End");
assertThat(pi).isEnded();
}
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/audit/AuditTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/audit/AuditTasks.java
index 62878fd4f7..922b721098 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/audit/AuditTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/audit/AuditTasks.java
@@ -21,15 +21,21 @@
package org.onap.so.bpmn.infrastructure.audit;
+import java.util.List;
import org.onap.so.audit.beans.AuditInventory;
import org.onap.so.bpmn.common.BuildingBlockExecution;
import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock;
import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
import org.onap.so.client.exception.BBObjectNotFoundException;
import org.onap.so.client.exception.ExceptionBuilder;
+import org.onap.so.client.graphinventory.GraphInventoryCommonObjectMapperProvider;
+import org.onap.so.db.request.beans.RequestProcessingData;
+import org.onap.so.db.request.client.RequestsDbClient;
+import org.onap.so.objects.audit.AAIObjectAuditList;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -83,12 +89,17 @@ public class AuditTasks {
GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock();
VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID);
+ GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
CloudRegion cloudRegion = gBBInput.getCloudRegion();
+ auditInventory.setMsoRequestId(gBBInput.getRequestContext().getMsoRequestId());
auditInventory.setCloudOwner(cloudRegion.getCloudOwner());
auditInventory.setCloudRegion(cloudRegion.getLcpCloudRegionId());
auditInventory.setTenantId(cloudRegion.getTenantId());
+ auditInventory.setVfModuleId(vfModule.getVfModuleId());
auditInventory.setHeatStackName(vfModule.getVfModuleName());
+ auditInventory.setGenericVnfId(genericVnf.getVnfId());
return auditInventory;
}
+
}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/common/data/TestDataSetup.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/common/data/TestDataSetup.java
index 825c703b74..4f1ad996dc 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/common/data/TestDataSetup.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/common/data/TestDataSetup.java
@@ -159,7 +159,7 @@ public class TestDataSetup {
public RequestContext buildRequestContext() {
RequestContext requestContext = new RequestContext();
- requestContext.setMsoRequestId(UUID.randomUUID().toString());
+ requestContext.setMsoRequestId("fb06f44c-c797-4f38-9b17-b4b975344600");
requestContext.setProductFamilyId("testProductFamilyId");
requestContext.setRequestorId("testRequestorId");
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/audit/AuditTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/audit/AuditTasksTest.java
index 3bf24291ea..cee06caa75 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/audit/AuditTasksTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/audit/AuditTasksTest.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,14 +21,20 @@ package org.onap.so.bpmn.infrastructure.audit;
import static com.shazam.shazamcrest.MatcherAssert.assertThat;
import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.junit.Assert.assertEquals;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.when;
+import java.util.ArrayList;
+import java.util.List;
+import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.mockito.ArgumentMatchers;
import org.mockito.InjectMocks;
+import org.mockito.Mockito;
+import org.onap.aai.domain.yang.Vserver;
import org.onap.so.audit.beans.AuditInventory;
import org.onap.so.bpmn.BaseTaskTest;
import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
@@ -36,6 +42,11 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
import org.onap.so.client.exception.BBObjectNotFoundException;
+import org.onap.so.client.graphinventory.GraphInventoryCommonObjectMapperProvider;
+import org.onap.so.db.request.beans.RequestProcessingData;
+import org.onap.so.objects.audit.AAIObjectAudit;
+import org.onap.so.objects.audit.AAIObjectAuditList;
+import com.fasterxml.jackson.core.JsonProcessingException;
public class AuditTasksTest extends BaseTaskTest {
@@ -50,16 +61,29 @@ public class AuditTasksTest extends BaseTaskTest {
public final ExpectedException exception = ExpectedException.none();
@Before
- public void before() throws BBObjectNotFoundException {
+ public void before() throws BBObjectNotFoundException, JsonProcessingException {
serviceInstance = setServiceInstance();
genericVnf = setGenericVnf();
vfModule = setVfModule();
+ buildRequestContext();
setCloudRegion();
+ setRequestContext();
when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.GENERIC_VNF_ID)))
.thenReturn(genericVnf);
when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.VF_MODULE_ID))).thenReturn(vfModule);
when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.SERVICE_INSTANCE_ID)))
.thenReturn(serviceInstance);
+ execution.setVariable("auditQuerySuccess", true);
+ AAIObjectAuditList auditList = new AAIObjectAuditList();
+ auditList.setHeatStackName("testHeatStackName");
+ AAIObjectAudit audit = new AAIObjectAudit();
+ Vserver vserver = new Vserver();
+ vserver.setVserverId("testVserverId");
+ audit.setAaiObject(vserver);
+ auditList.getAuditList().add(audit);
+ GraphInventoryCommonObjectMapperProvider objectMapper = new GraphInventoryCommonObjectMapperProvider();
+ String auditListString = objectMapper.getMapper().writeValueAsString(audit);
+ execution.setVariable("auditList", auditListString);
}
@Test
@@ -68,8 +92,12 @@ public class AuditTasksTest extends BaseTaskTest {
expectedAuditInventory.setCloudOwner("testCloudOwner");
expectedAuditInventory.setCloudRegion("testLcpCloudRegionId");
expectedAuditInventory.setHeatStackName("testVfModuleName1");
+ expectedAuditInventory.setVfModuleId("testVfModuleId1");
expectedAuditInventory.setTenantId("testTenantId");
+ expectedAuditInventory.setGenericVnfId("testVnfId1");
+ expectedAuditInventory.setMsoRequestId("fb06f44c-c797-4f38-9b17-b4b975344600");
auditTasks.setupAuditVariable(execution);
assertThat((AuditInventory) execution.getVariable("auditInventory"), sameBeanAs(expectedAuditInventory));
}
+
}