summaryrefslogtreecommitdiffstats
path: root/adapters/mso-openstack-adapters/src/main/java/org/onap
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2019-04-30 10:07:45 -0400
committerSteve Smokowski <ss835w@att.com>2019-05-03 16:20:12 +0000
commita16bf8f9315060822c16ec92a0532b8375c1a399 (patch)
treeccb13c95c1b6c63f0495566e8bd347ad7402a84b /adapters/mso-openstack-adapters/src/main/java/org/onap
parentd26574fe0e44f43bfbf507adbf91a28c1b53c63a (diff)
parent54b6e6ac185b55d89248cd3c55b1d7766ecaf294 (diff)
Merge remote-tracking branch 'origin/dublin'
merged dublin into master branch Change-Id: Ifb78d405611b65764fd4f01558b0e703551ed663 Issue-ID: SO-1830 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com> Signed-off-by: Smokowski, Steve (ss835w) <ss835w@us.att.com>
Diffstat (limited to 'adapters/mso-openstack-adapters/src/main/java/org/onap')
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryTask.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryTask.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryTask.java
index b4cdcb45e2..74cf7c38c9 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryTask.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryTask.java
@@ -7,7 +7,7 @@
* 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
@@ -48,6 +48,7 @@ public class CreateInventoryTask {
protected void executeExternalTask(ExternalTask externalTask, ExternalTaskService externalTaskService) {
setupMDC(externalTask);
boolean success = true;
+ boolean inventoryException = false;
String auditInventoryString = externalTask.getVariable("auditInventoryResult");
AAIObjectAuditList auditInventory = null;
try {
@@ -61,6 +62,10 @@ public class CreateInventoryTask {
logger.info("Executing External Task Create Inventory, Retry Number: {} \n {}", auditInventory,
externalTask.getRetries());
createInventory.createInventory(auditInventory);
+ } catch (InventoryException e) {
+ logger.error("Error during inventory of stack", e);
+ success = false;
+ inventoryException = true;
} catch (Exception e) {
logger.error("Error during inventory of stack", e);
success = false;
@@ -68,6 +73,9 @@ public class CreateInventoryTask {
if (success) {
externalTaskService.complete(externalTask);
logger.debug("The External Task Id: {} Successful", externalTask.getId());
+ } else if (inventoryException) {
+ logger.debug("The External Task Id: {} Failed, Retry not needed", externalTask.getId());
+ externalTaskService.handleBpmnError(externalTask, "AAIInventoryFailure");
} else {
if (externalTask.getRetries() == null) {
logger.debug("The External Task Id: {} Failed, Setting Retries to Default Start Value: {}",