aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Benjamin <max.benjamin@att.com>2020-11-03 19:34:10 +0000
committerGerrit Code Review <gerrit@onap.org>2020-11-03 19:34:10 +0000
commit331650299b48d34c3c6bf11139319d64a489a1ad (patch)
treeb3aebf8b7ed9d8d1c6a18a46d3a353ca15ba3ba1
parent83ff479029986df8326e3119d3ee31f77209c455 (diff)
parent9630dd840fac8977329d7ff2dacc96e6db31248d (diff)
Merge "Added to handle inventory failure errors in bpmn."
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/TaskServices.java10
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/CreateInventoryTask.java7
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/DeleteInventoryTask.java7
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/orchestration/PollService.java6
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/orchestration/RollbackService.java2
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/orchestration/StackService.java2
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java14
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVfModuleBB.bpmn149
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVfModuleBB.bpmn69
-rw-r--r--common/src/main/java/org/onap/so/utils/ExternalTaskServiceUtils.java10
10 files changed, 148 insertions, 128 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/TaskServices.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/TaskServices.java
index b176892192..4e0c4ad8a6 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/TaskServices.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/TaskServices.java
@@ -62,13 +62,13 @@ public class TaskServices {
public void createtAAIInventory() throws Exception {
for (int i = 0; i < externalTaskServiceUtils.getMaxClients(); i++) {
ExternalTaskClient client = externalTaskServiceUtils.createExternalTaskClient();
- client.subscribe("InventoryCreate").lockDuration(externalTaskServiceUtils.getLongLockDuration())
+ client.subscribe("InventoryCreate").lockDuration(externalTaskServiceUtils.getLockDurationMedium())
.handler(createInventory::executeExternalTask).open();
}
}
@PostConstruct
- public void auditAAIInventory() throws Exception {
+ public void deleteAAIInventory() throws Exception {
for (int i = 0; i < externalTaskServiceUtils.getMaxClients(); i++) {
externalTaskServiceUtils.createExternalTaskClient().subscribe("InventoryDelete")
.lockDuration(externalTaskServiceUtils.getLockDurationMedium())
@@ -80,7 +80,7 @@ public class TaskServices {
public void openstackInvoker() throws Exception {
for (int i = 0; i < externalTaskServiceUtils.getMaxClients(); i++) {
ExternalTaskClient client = externalTaskServiceUtils.createExternalTaskClient();
- client.subscribe("OpenstackAdapterInvoke").lockDuration(externalTaskServiceUtils.getLockDuration())
+ client.subscribe("OpenstackAdapterInvoke").lockDuration(externalTaskServiceUtils.getLockDurationShort())
.handler(stackService::executeExternalTask).open();
}
}
@@ -89,7 +89,7 @@ public class TaskServices {
public void openstackPoller() throws Exception {
for (int i = 0; i < externalTaskServiceUtils.getMaxClients(); i++) {
ExternalTaskClient client = externalTaskServiceUtils.createExternalTaskClient();
- client.subscribe("OpenstackAdapterPolling").lockDuration(externalTaskServiceUtils.getLockDuration())
+ client.subscribe("OpenstackAdapterPolling").lockDuration(externalTaskServiceUtils.getLockDurationMedium())
.handler(pollService::executeExternalTask).open();
}
}
@@ -98,7 +98,7 @@ public class TaskServices {
public void openstackRollback() throws Exception {
for (int i = 0; i < externalTaskServiceUtils.getMaxClients(); i++) {
ExternalTaskClient client = externalTaskServiceUtils.createExternalTaskClient();
- client.subscribe("OpenstackAdapterRollback").lockDuration(externalTaskServiceUtils.getLockDuration())
+ client.subscribe("OpenstackAdapterRollback").lockDuration(externalTaskServiceUtils.getLockDurationShort())
.handler(rollbackService::executeExternalTask).open();
}
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/CreateInventoryTask.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/CreateInventoryTask.java
index 3c9a4833ae..711394a95d 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/CreateInventoryTask.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/CreateInventoryTask.java
@@ -22,6 +22,8 @@
package org.onap.so.adapters.tasks.inventory;
+import java.util.HashMap;
+import java.util.Map;
import org.camunda.bpm.client.task.ExternalTask;
import org.camunda.bpm.client.task.ExternalTaskService;
import org.onap.logging.ref.slf4j.ONAPLogConstants;
@@ -57,6 +59,7 @@ public class CreateInventoryTask extends ExternalTaskUtils {
public void executeExternalTask(ExternalTask externalTask, ExternalTaskService externalTaskService) {
mdcSetup.setupMDC(externalTask);
+ Map<String, Object> variables = new HashMap<>();
String externalTaskId = externalTask.getId();
CloudInformation cloudInformation = externalTask.getVariable("cloudInformation");
boolean success = true;
@@ -69,6 +72,7 @@ public class CreateInventoryTask extends ExternalTaskUtils {
} catch (Exception e) {
logger.error("Error during inventory of stack", e);
success = false;
+ variables.put("inventoryErrorMessage", e.getMessage());
}
mdcSetup.setElapsedTime();
if (success) {
@@ -84,7 +88,8 @@ public class CreateInventoryTask extends ExternalTaskUtils {
externalTaskService.handleFailure(externalTask, UNABLE_TO_WRITE_ALL_INVENTORY_TO_A_AI,
UNABLE_TO_WRITE_ALL_INVENTORY_TO_A_AI, getRetrySequence().length, 10000);
} else if (retryCount != null && retryCount - 1 == 0) {
- externalTaskService.handleBpmnError(externalTask, AAI_INVENTORY_FAILURE);
+ externalTaskService.handleBpmnError(externalTask, AAI_INVENTORY_FAILURE, AAI_INVENTORY_FAILURE,
+ variables);
mdcSetup.setResponseCode(ONAPLogConstants.ResponseStatus.ERROR.toString());
logger.error("The External Task {} Failed, All Retries Exhausted", externalTaskId);
logger.info(ONAPLogConstants.Markers.EXIT, "Exiting");
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/DeleteInventoryTask.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/DeleteInventoryTask.java
index 08361bdbbf..aad517129f 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/DeleteInventoryTask.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/DeleteInventoryTask.java
@@ -22,6 +22,8 @@
package org.onap.so.adapters.tasks.inventory;
+import java.util.HashMap;
+import java.util.Map;
import org.camunda.bpm.client.task.ExternalTask;
import org.camunda.bpm.client.task.ExternalTaskService;
import org.onap.logging.ref.slf4j.ONAPLogConstants;
@@ -56,6 +58,7 @@ public class DeleteInventoryTask extends ExternalTaskUtils {
public void executeExternalTask(ExternalTask externalTask, ExternalTaskService externalTaskService) {
mdcSetup.setupMDC(externalTask);
+ Map<String, Object> variables = new HashMap<>();
String externalTaskId = externalTask.getId();
CloudInformation cloudInformation = externalTask.getVariable("cloudInformation");
boolean success = true;
@@ -66,6 +69,7 @@ public class DeleteInventoryTask extends ExternalTaskUtils {
} catch (Exception e) {
logger.error("Error during inventory of stack", e);
success = false;
+ variables.put("inventoryErrorMessage", e.getMessage());
}
mdcSetup.setElapsedTime();
if (success) {
@@ -81,7 +85,8 @@ public class DeleteInventoryTask extends ExternalTaskUtils {
externalTaskService.handleFailure(externalTask, UNABLE_TO_WRITE_ALL_INVENTORY_TO_A_AI,
UNABLE_TO_WRITE_ALL_INVENTORY_TO_A_AI, getRetrySequence().length, 10000);
} else if (retryCount != null && retryCount - 1 == 0) {
- externalTaskService.handleBpmnError(externalTask, AAI_INVENTORY_FAILURE);
+ externalTaskService.handleBpmnError(externalTask, AAI_INVENTORY_FAILURE, AAI_INVENTORY_FAILURE,
+ variables);
mdcSetup.setResponseCode(ONAPLogConstants.ResponseStatus.ERROR.toString());
logger.error("The External Task Id: {} Failed, All Retries Exhausted", externalTaskId);
logger.info(ONAPLogConstants.Markers.EXIT, "Exiting");
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/orchestration/PollService.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/orchestration/PollService.java
index 9ff50e8644..6a5381cf3e 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/orchestration/PollService.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/orchestration/PollService.java
@@ -68,7 +68,7 @@ public class PollService extends ExternalTaskUtils {
public void executeExternalTask(ExternalTask externalTask, ExternalTaskService externalTaskService) {
mdcSetup.setupMDC(externalTask);
- logger.trace("Executing External Task Poll Service");
+ logger.debug("Starting External Task Poll Service");
Map<String, Object> variables = new HashMap<>();
MutableBoolean success = new MutableBoolean();
String errorMessage = null;
@@ -103,11 +103,11 @@ public class PollService extends ExternalTaskUtils {
}
} catch (Exception e) {
logger.error("Error during External Task Poll Service", e);
- errorMessage = e.getMessage();
+ errorMessage = e.toString();
+ variables.put("openstackAdapterErrorMessage", errorMessage);
}
variables.put("OpenstackPollSuccess", success.booleanValue());
- variables.put("openstackAdapterErrorMessage", errorMessage);
if (success.isTrue()) {
externalTaskService.complete(externalTask, variables);
logger.debug("The External Task Id: {} Successful", externalTask.getId());
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/orchestration/RollbackService.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/orchestration/RollbackService.java
index 15e6ff581d..c25d752cc4 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/orchestration/RollbackService.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/orchestration/RollbackService.java
@@ -39,7 +39,7 @@ public class RollbackService extends ExternalTaskUtils {
public void executeExternalTask(ExternalTask externalTask, ExternalTaskService externalTaskService) {
mdcSetup.setupMDC(externalTask);
- logger.trace("Executing External Task Rollback Service");
+ logger.debug("Starting External Task Rollback Service");
Map<String, Object> variables = new HashMap<>();
boolean success = false;
boolean pollRollbackStatus = false;
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/orchestration/StackService.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/orchestration/StackService.java
index 5196ffffda..c9fa30d949 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/orchestration/StackService.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/orchestration/StackService.java
@@ -91,7 +91,7 @@ public class StackService extends ExternalTaskUtils {
Map<String, Object> variables = new HashMap<>();
mdcSetup.setupMDC(externalTask);
String xmlRequest = externalTask.getVariable("openstackAdapterTaskRequest");
- logger.debug("Executing External Task Stack Service. {}", xmlRequest);
+ logger.debug("Starting External Task Stack Service. {}", xmlRequest);
MutableBoolean success = new MutableBoolean();
MutableBoolean backout = new MutableBoolean();
String response = "";
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java
index 43db27917e..f40948fc49 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java
@@ -376,4 +376,18 @@ public class ExceptionBuilder {
}
+ public void processInventoryException(DelegateExecution execution) {
+ String errorMessage = "";
+ logger.debug("Processing Inventory Exception");
+ try {
+ errorMessage = (String) execution.getVariable("inventoryErrorMessage");
+ } catch (Exception e) {
+ logger.debug("Error while Processing Inventory Exception", e);
+ }
+ buildWorkflowException(execution, 500, errorMessage, Components.OPENSTACK);
+ throw new BpmnError("MSOWorkflowException");
+
+
+ }
+
}
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVfModuleBB.bpmn
index 7638f34a59..9e2c0db6ea 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVfModuleBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVfModuleBB.bpmn
@@ -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: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: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="3.7.0">
<bpmn:process id="CreateVfModuleBB" name="CreateVfModuleBB" isExecutable="true">
<bpmn:startEvent id="CreateVfModuleBB_Start">
<bpmn:outgoing>SequenceFlow_1xr6chl</bpmn:outgoing>
@@ -43,17 +43,6 @@
<bpmn:incoming>SequenceFlow_15do1tu</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0rds4rj</bpmn:outgoing>
</bpmn:serviceTask>
- <bpmn:subProcess id="SubProcess_1getwnf" name="Error Handling&#10;&#10;" triggeredByEvent="true">
- <bpmn:startEvent id="StartEvent_1c8o652">
- <bpmn:outgoing>SequenceFlow_0gcots6</bpmn:outgoing>
- <bpmn:errorEventDefinition />
- </bpmn:startEvent>
- <bpmn:endEvent id="EndEvent_1emam1w">
- <bpmn:incoming>SequenceFlow_0gcots6</bpmn:incoming>
- <bpmn:terminateEventDefinition />
- </bpmn:endEvent>
- <bpmn:sequenceFlow id="SequenceFlow_0gcots6" sourceRef="StartEvent_1c8o652" targetRef="EndEvent_1emam1w" />
- </bpmn:subProcess>
<bpmn:sequenceFlow id="SequenceFlow_0rds4rj" sourceRef="UpdateVfModuleHeatStackId" targetRef="UpdateVfModuleStatus" />
<bpmn:sequenceFlow id="SequenceFlow_1vbwdaw" sourceRef="UpdateVfModuleStatus" targetRef="CreateVfModuleBB_End" />
<bpmn:serviceTask id="CreateNetworkPolicies" name="AAI Create (network policies)" camunda:expression="${AAICreateTasks.createNetworkPolicies(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
@@ -61,7 +50,7 @@
<bpmn:outgoing>SequenceFlow_0xqhep5</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:sequenceFlow id="SequenceFlow_0xqhep5" sourceRef="CreateNetworkPolicies" targetRef="UpdateVnfIpv4OamAddress" />
- <bpmn:serviceTask id="UpdateVnfIpv4OamAddress" name="AAI Update (VNF) " camunda:expression="${AAIUpdateTasks.updateIpv4OamAddressVnf(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
+ <bpmn:serviceTask id="UpdateVnfIpv4OamAddress" name="AAI Update (VNF) " camunda:expression="${AAIUpdateTasks.updateIpv4OamAddressVnf(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
<bpmn:incoming>SequenceFlow_0xqhep5</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1yo6mvv</bpmn:outgoing>
</bpmn:serviceTask>
@@ -97,14 +86,30 @@
<bpmn:outgoing>SequenceFlow_1mg8eym</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:sequenceFlow id="YesHelm" name="Yes Helm" sourceRef="CheckIfIsHelm" targetRef="CnfAdapter">
- <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("isHelm")}]]></bpmn:conditionExpression>
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("isHelm")}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_1mg8eym" sourceRef="CnfAdapter" targetRef="ServiceTask_01zrt6x" />
<bpmn:sequenceFlow id="SequenceFlow_1ig2ix4" sourceRef="QueryVfModule" targetRef="CheckIfIsHelm" />
<bpmn:sequenceFlow id="NoHelm" name="No Helm" sourceRef="CheckIfIsHelm" targetRef="CreateVfModule" />
<bpmn:sequenceFlow id="SequenceFlow_0dehck5" sourceRef="CreateVfModule" targetRef="VnfAdapter" />
<bpmn:sequenceFlow id="SequenceFlow_0uetprw" sourceRef="VnfAdapter" targetRef="ServiceTask_01zrt6x" />
+ <bpmn:subProcess id="Activity_10eqhmz" name="Inventory Error Handling" triggeredByEvent="true">
+ <bpmn:endEvent id="Event_108oetk">
+ <bpmn:incoming>Flow_03q6ty9</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:startEvent id="Event_1pengt4">
+ <bpmn:outgoing>Flow_1sqy91r</bpmn:outgoing>
+ <bpmn:errorEventDefinition id="ErrorEventDefinition_1idpz1m" errorRef="Error_0t7oivz" />
+ </bpmn:startEvent>
+ <bpmn:serviceTask id="Activity_1p8hxyt" name="Process Error" camunda:expression="${ExceptionBuilder.processInventoryException(execution)}">
+ <bpmn:incoming>Flow_1sqy91r</bpmn:incoming>
+ <bpmn:outgoing>Flow_03q6ty9</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="Flow_1sqy91r" sourceRef="Event_1pengt4" targetRef="Activity_1p8hxyt" />
+ <bpmn:sequenceFlow id="Flow_03q6ty9" sourceRef="Activity_1p8hxyt" targetRef="Event_108oetk" />
+ </bpmn:subProcess>
</bpmn:process>
+ <bpmn:error id="Error_0t7oivz" name="AAIInventoryFailure" errorCode="AAIInventoryFailure" />
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVfModuleBB">
<bpmndi:BPMNShape id="StartEvent_0kxwniy_di" bpmnElement="CreateVfModuleBB_Start">
@@ -117,8 +122,8 @@
<dc:Bounds x="513" y="66" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1xr6chl_di" bpmnElement="SequenceFlow_1xr6chl">
- <di:waypoint xsi:type="dc:Point" x="192" y="106" />
- <di:waypoint xsi:type="dc:Point" x="313" y="106" />
+ <di:waypoint x="192" y="106" />
+ <di:waypoint x="313" y="106" />
<bpmndi:BPMNLabel>
<dc:Bounds x="156" y="91" width="0" height="0" />
</bpmndi:BPMNLabel>
@@ -133,8 +138,8 @@
<dc:Bounds x="794" y="66" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1s4rpyp_di" bpmnElement="SequenceFlow_1s4rpyp">
- <di:waypoint xsi:type="dc:Point" x="413" y="106" />
- <di:waypoint xsi:type="dc:Point" x="513" y="106" />
+ <di:waypoint x="413" y="106" />
+ <di:waypoint x="513" y="106" />
<bpmndi:BPMNLabel>
<dc:Bounds x="321" y="91" width="90" height="0" />
</bpmndi:BPMNLabel>
@@ -151,40 +156,18 @@
<bpmndi:BPMNShape id="ServiceTask_04k1b85_di" bpmnElement="UpdateVfModuleHeatStackId">
<dc:Bounds x="959" y="428" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="SubProcess_1getwnf_di" bpmnElement="SubProcess_1getwnf" isExpanded="true">
- <dc:Bounds x="202" y="556" width="231" height="135" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="StartEvent_1c8o652_di" bpmnElement="StartEvent_1c8o652">
- <dc:Bounds x="241" y="614" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="72" y="606" width="90" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="EndEvent_1emam1w_di" bpmnElement="EndEvent_1emam1w">
- <dc:Bounds x="378" y="614" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="209" y="606" width="90" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0gcots6_di" bpmnElement="SequenceFlow_0gcots6">
- <di:waypoint xsi:type="dc:Point" x="277" y="632" />
- <di:waypoint xsi:type="dc:Point" x="378" y="632" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="186" y="567" width="90" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0rds4rj_di" bpmnElement="SequenceFlow_0rds4rj">
- <di:waypoint xsi:type="dc:Point" x="1059" y="468" />
- <di:waypoint xsi:type="dc:Point" x="1124" y="468" />
+ <di:waypoint x="1059" y="468" />
+ <di:waypoint x="1124" y="468" />
<bpmndi:BPMNLabel>
<dc:Bounds x="950" y="409" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1vbwdaw_di" bpmnElement="SequenceFlow_1vbwdaw">
- <di:waypoint xsi:type="dc:Point" x="1224" y="468" />
- <di:waypoint xsi:type="dc:Point" x="1265" y="468" />
- <di:waypoint xsi:type="dc:Point" x="1265" y="468" />
- <di:waypoint xsi:type="dc:Point" x="1300" y="468" />
+ <di:waypoint x="1224" y="468" />
+ <di:waypoint x="1265" y="468" />
+ <di:waypoint x="1265" y="468" />
+ <di:waypoint x="1300" y="468" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1138" y="424" width="90" height="0" />
</bpmndi:BPMNLabel>
@@ -193,8 +176,8 @@
<dc:Bounds x="324" y="428" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0xqhep5_di" bpmnElement="SequenceFlow_0xqhep5">
- <di:waypoint xsi:type="dc:Point" x="424" y="468" />
- <di:waypoint xsi:type="dc:Point" x="477" y="468" />
+ <di:waypoint x="424" y="468" />
+ <di:waypoint x="477" y="468" />
<bpmndi:BPMNLabel>
<dc:Bounds x="309" y="409" width="90" height="0" />
</bpmndi:BPMNLabel>
@@ -203,8 +186,8 @@
<dc:Bounds x="477" y="428" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1yo6mvv_di" bpmnElement="SequenceFlow_1yo6mvv">
- <di:waypoint xsi:type="dc:Point" x="577" y="468" />
- <di:waypoint xsi:type="dc:Point" x="646" y="468" />
+ <di:waypoint x="577" y="468" />
+ <di:waypoint x="646" y="468" />
<bpmndi:BPMNLabel>
<dc:Bounds x="470" y="409" width="90" height="0" />
</bpmndi:BPMNLabel>
@@ -213,8 +196,8 @@
<dc:Bounds x="646" y="428" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1i03uy2_di" bpmnElement="SequenceFlow_1i03uy2">
- <di:waypoint xsi:type="dc:Point" x="746" y="468" />
- <di:waypoint xsi:type="dc:Point" x="794" y="468" />
+ <di:waypoint x="746" y="468" />
+ <di:waypoint x="794" y="468" />
<bpmndi:BPMNLabel>
<dc:Bounds x="628" y="409" width="90" height="0" />
</bpmndi:BPMNLabel>
@@ -223,8 +206,8 @@
<dc:Bounds x="794" y="428" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_15do1tu_di" bpmnElement="SequenceFlow_15do1tu">
- <di:waypoint xsi:type="dc:Point" x="894" y="468" />
- <di:waypoint xsi:type="dc:Point" x="959" y="468" />
+ <di:waypoint x="894" y="468" />
+ <di:waypoint x="959" y="468" />
<bpmndi:BPMNLabel>
<dc:Bounds x="785" y="399" width="90" height="0" />
</bpmndi:BPMNLabel>
@@ -233,8 +216,8 @@
<dc:Bounds x="665" y="326" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1io8r33_di" bpmnElement="SequenceFlow_1io8r33">
- <di:waypoint xsi:type="dc:Point" x="665" y="366" />
- <di:waypoint xsi:type="dc:Point" x="563" y="366" />
+ <di:waypoint x="665" y="366" />
+ <di:waypoint x="563" y="366" />
<bpmndi:BPMNLabel>
<dc:Bounds x="569" y="297" width="90" height="20" />
</bpmndi:BPMNLabel>
@@ -243,10 +226,10 @@
<dc:Bounds x="463" y="326" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1yn8o6d_di" bpmnElement="SequenceFlow_1yn8o6d">
- <di:waypoint xsi:type="dc:Point" x="463" y="366" />
- <di:waypoint xsi:type="dc:Point" x="255" y="366" />
- <di:waypoint xsi:type="dc:Point" x="255" y="463" />
- <di:waypoint xsi:type="dc:Point" x="324" y="463" />
+ <di:waypoint x="463" y="366" />
+ <di:waypoint x="255" y="366" />
+ <di:waypoint x="255" y="463" />
+ <di:waypoint x="324" y="463" />
<bpmndi:BPMNLabel>
<dc:Bounds x="225" y="361" width="90" height="20" />
</bpmndi:BPMNLabel>
@@ -261,48 +244,68 @@
<dc:Bounds x="665" y="166" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0q1janp_di" bpmnElement="YesHelm">
- <di:waypoint xsi:type="dc:Point" x="715" y="131" />
- <di:waypoint xsi:type="dc:Point" x="715" y="166" />
+ <di:waypoint x="715" y="131" />
+ <di:waypoint x="715" y="166" />
<bpmndi:BPMNLabel>
<dc:Bounds x="730" y="136" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1mg8eym_di" bpmnElement="SequenceFlow_1mg8eym">
- <di:waypoint xsi:type="dc:Point" x="715" y="246" />
- <di:waypoint xsi:type="dc:Point" x="715" y="326" />
+ <di:waypoint x="715" y="246" />
+ <di:waypoint x="715" y="326" />
<bpmndi:BPMNLabel>
<dc:Bounds x="846" y="291.5" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1ig2ix4_di" bpmnElement="SequenceFlow_1ig2ix4">
- <di:waypoint xsi:type="dc:Point" x="613" y="106" />
- <di:waypoint xsi:type="dc:Point" x="691" y="106" />
+ <di:waypoint x="613" y="106" />
+ <di:waypoint x="691" y="106" />
<bpmndi:BPMNLabel>
<dc:Bounds x="652" y="85" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1g7zahc_di" bpmnElement="NoHelm">
- <di:waypoint xsi:type="dc:Point" x="740" y="106" />
- <di:waypoint xsi:type="dc:Point" x="794" y="106" />
+ <di:waypoint x="740" y="106" />
+ <di:waypoint x="794" y="106" />
<bpmndi:BPMNLabel>
<dc:Bounds x="767" y="85" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0dehck5_di" bpmnElement="SequenceFlow_0dehck5">
- <di:waypoint xsi:type="dc:Point" x="894" y="106" />
- <di:waypoint xsi:type="dc:Point" x="959" y="106" />
+ <di:waypoint x="894" y="106" />
+ <di:waypoint x="959" y="106" />
<bpmndi:BPMNLabel>
<dc:Bounds x="926.5" y="85" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0uetprw_di" bpmnElement="SequenceFlow_0uetprw">
- <di:waypoint xsi:type="dc:Point" x="1009" y="146" />
- <di:waypoint xsi:type="dc:Point" x="1009" y="366" />
- <di:waypoint xsi:type="dc:Point" x="765" y="366" />
+ <di:waypoint x="1009" y="146" />
+ <di:waypoint x="1009" y="366" />
+ <di:waypoint x="765" y="366" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1024" y="228" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="Activity_10eqhmz_di" bpmnElement="Activity_10eqhmz" isExpanded="true">
+ <dc:Bounds x="240" y="590" width="340" height="180" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="Event_108oetk_di" bpmnElement="Event_108oetk">
+ <dc:Bounds x="512" y="662" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="Event_1pengt4_di" bpmnElement="Event_1pengt4">
+ <dc:Bounds x="280" y="662" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="Activity_1p8hxyt_di" bpmnElement="Activity_1p8hxyt">
+ <dc:Bounds x="360" y="640" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="Flow_1sqy91r_di" bpmnElement="Flow_1sqy91r">
+ <di:waypoint x="316" y="680" />
+ <di:waypoint x="360" y="680" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="Flow_03q6ty9_di" bpmnElement="Flow_03q6ty9">
+ <di:waypoint x="460" y="680" />
+ <di:waypoint x="512" y="680" />
+ </bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
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 9a33a3e4bf..fba1139117 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
@@ -31,17 +31,6 @@
<bpmn:incoming>SequenceFlow_08tvhtf</bpmn:incoming>
<bpmn:outgoing>Flow_0hlvlw2</bpmn:outgoing>
</bpmn:callActivity>
- <bpmn:subProcess id="SubProcess_11p7mrh" name="Error Handling&#10;&#10;" triggeredByEvent="true">
- <bpmn:startEvent id="StartEvent_1xp6ewt">
- <bpmn:outgoing>SequenceFlow_0h607z0</bpmn:outgoing>
- <bpmn:errorEventDefinition />
- </bpmn:startEvent>
- <bpmn:endEvent id="EndEvent_0guhjau">
- <bpmn:incoming>SequenceFlow_0h607z0</bpmn:incoming>
- <bpmn:terminateEventDefinition />
- </bpmn:endEvent>
- <bpmn:sequenceFlow id="SequenceFlow_0h607z0" sourceRef="StartEvent_1xp6ewt" targetRef="EndEvent_0guhjau" />
- </bpmn:subProcess>
<bpmn:serviceTask id="UpdateVfModuleHeatStackId" name="&#10;AAI&#10;Update&#10; (vf module)&#10;" camunda:expression="${AAIUpdateTasks.updateHeatStackIdVfModule(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
<bpmn:incoming>SequenceFlow_0yuz21z</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_01vfwtp</bpmn:outgoing>
@@ -89,9 +78,25 @@
<bpmn:sequenceFlow id="Flow_0plbl7p" sourceRef="ServiceTask_0itw3by" targetRef="aaiThrow" />
<bpmn:sequenceFlow id="Flow_0hlvlw2" sourceRef="VnfAdapter" targetRef="ServiceTask_08ulmzc" />
<bpmn:sequenceFlow id="Flow_02lmh6f" sourceRef="DeleteVfModuleBB_Start" targetRef="DeleteVfModuleVnfAdapter" />
+ <bpmn:subProcess id="Activity_1thbmzc" name="Inventory Error Handling" triggeredByEvent="true">
+ <bpmn:endEvent id="Event_00dlrto">
+ <bpmn:incoming>Flow_0yqo5xu</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:startEvent id="Event_0dfwcfl">
+ <bpmn:outgoing>Flow_0qyhv7c</bpmn:outgoing>
+ <bpmn:errorEventDefinition id="ErrorEventDefinition_1p6vsj6" errorRef="Error_1le3oui" />
+ </bpmn:startEvent>
+ <bpmn:serviceTask id="Activity_025387k" name="Process Error" camunda:expression="${ExceptionBuilder.processInventoryException(execution)}">
+ <bpmn:incoming>Flow_0qyhv7c</bpmn:incoming>
+ <bpmn:outgoing>Flow_0yqo5xu</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="Flow_0qyhv7c" sourceRef="Event_0dfwcfl" targetRef="Activity_025387k" />
+ <bpmn:sequenceFlow id="Flow_0yqo5xu" sourceRef="Activity_025387k" targetRef="Event_00dlrto" />
+ </bpmn:subProcess>
</bpmn:process>
<bpmn:error id="Error_0jjnve8" name="Error_3k24na6" errorCode="AAIInventoryFailure" />
<bpmn:escalation id="Escalation_130je8j" name="audit" escalationCode="audit1" />
+ <bpmn:error id="Error_1le3oui" name="AAIInventoryFailure" errorCode="AAIInventoryFailure" />
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteVfModuleBB">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="DeleteVfModuleBB_Start">
@@ -122,28 +127,6 @@
<bpmndi:BPMNShape id="CallActivity_0whogn3_di" bpmnElement="VnfAdapter">
<dc:Bounds x="435" y="84" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="SubProcess_11p7mrh_di" bpmnElement="SubProcess_11p7mrh" isExpanded="true">
- <dc:Bounds x="304" y="500" width="231" height="135" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="StartEvent_1xp6ewt_di" bpmnElement="StartEvent_1xp6ewt">
- <dc:Bounds x="347" y="562" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="261" y="976" width="90" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="EndEvent_0guhjau_di" bpmnElement="EndEvent_0guhjau">
- <dc:Bounds x="476" y="562" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="390" y="976" width="90" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0h607z0_di" bpmnElement="SequenceFlow_0h607z0">
- <di:waypoint x="383" y="580" />
- <di:waypoint x="476" y="580" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="371" y="937" width="90" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_0vlgqod_di" bpmnElement="UpdateVfModuleHeatStackId">
<dc:Bounds x="800" y="308" width="100" height="80" />
</bpmndi:BPMNShape>
@@ -239,6 +222,26 @@
<di:waypoint x="195" y="124" />
<di:waypoint x="290" y="124" />
</bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="Activity_1thbmzc_di" bpmnElement="Activity_1thbmzc" isExpanded="true">
+ <dc:Bounds x="280" y="490" width="340" height="180" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="Event_00dlrto_di" bpmnElement="Event_00dlrto">
+ <dc:Bounds x="552" y="562" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="Event_0dfwcfl_di" bpmnElement="Event_0dfwcfl">
+ <dc:Bounds x="320" y="562" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="Activity_025387k_di" bpmnElement="Activity_025387k">
+ <dc:Bounds x="400" y="540" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="Flow_0qyhv7c_di" bpmnElement="Flow_0qyhv7c">
+ <di:waypoint x="356" y="580" />
+ <di:waypoint x="400" y="580" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="Flow_0yqo5xu_di" bpmnElement="Flow_0yqo5xu">
+ <di:waypoint x="500" y="580" />
+ <di:waypoint x="552" y="580" />
+ </bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
diff --git a/common/src/main/java/org/onap/so/utils/ExternalTaskServiceUtils.java b/common/src/main/java/org/onap/so/utils/ExternalTaskServiceUtils.java
index c601b88ae5..1a8307e8bc 100644
--- a/common/src/main/java/org/onap/so/utils/ExternalTaskServiceUtils.java
+++ b/common/src/main/java/org/onap/so/utils/ExternalTaskServiceUtils.java
@@ -64,16 +64,6 @@ public class ExternalTaskServiceUtils {
return Integer.parseInt(env.getProperty("workflow.topics.maxClients", "10"));
}
- public Long getLockDuration() {
- Long lockDuration = Long.parseLong(env.getProperty("mso.audit.lock-time", "60000"));
- return lockDuration;
- }
-
- public Long getLongLockDuration() {
- Long lockDuration = Long.parseLong(env.getProperty("mso.long.lock-time", "600000"));
- return lockDuration;
- }
-
@ScheduledLogging
@Scheduled(fixedDelay = 30000)
public void checkAllClientsActive() {