aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main/java
diff options
context:
space:
mode:
authorRob Daugherty <rd472p@att.com>2018-11-15 00:36:50 +0000
committerGerrit Code Review <gerrit@onap.org>2018-11-15 00:36:50 +0000
commitb9b50c8cd06a5bb10ccedf3e0dc12965f3177ba2 (patch)
tree12b28d6c4f594a087eca070fa441477441621f15 /bpmn/MSOCommonBPMN/src/main/java
parente6a629beea75292037c3cabbc23e3a7a1b718b11 (diff)
parentbe24ada950e9f41a6034b472fc5502b285a510d5 (diff)
Merge "separate error status from progression status"
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main/java')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java
index 32540eb996..ba9426d88a 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java
@@ -31,6 +31,8 @@ import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock;
import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
import org.onap.so.db.catalog.beans.macro.RainyDayHandlerStatus;
import org.onap.so.db.catalog.client.CatalogDbClient;
+import org.onap.so.db.request.beans.InfraActiveRequests;
+import org.onap.so.db.request.client.RequestsDbClient;
import org.onap.so.logger.MsoLogger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
@@ -44,6 +46,8 @@ public class ExecuteBuildingBlockRainyDay {
@Autowired
private CatalogDbClient catalogDbClient;
+ @Autowired
+ private RequestsDbClient requestDbclient;
private static final String ASTERISK = "*";
@Autowired
@@ -68,6 +72,7 @@ public class ExecuteBuildingBlockRainyDay {
ExecuteBuildingBlock ebb = (ExecuteBuildingBlock) execution.getVariable("buildingBlock");
String bbName = ebb.getBuildingBlock().getBpmnFlowName();
GeneralBuildingBlock gBBInput = (GeneralBuildingBlock) execution.getVariable("gBBInput");
+ String requestId = (String) execution.getVariable("mso-request-id");
Map<ResourceKey, String> lookupKeyMap = (Map<ResourceKey, String>) execution.getVariable("lookupKeyMap");
String serviceType = ASTERISK;
boolean aLaCarte = (boolean) execution.getVariable("aLaCarte");
@@ -122,6 +127,16 @@ public class ExecuteBuildingBlockRainyDay {
handlingCode = rainyDayHandlerStatus.getSecondaryPolicy();
}
}
+ if(!primaryPolicy){
+ try{
+ InfraActiveRequests request = requestDbclient.getInfraActiveRequestbyRequestId(requestId);
+ request.setRetryStatusMessage("Retries have been exhausted.");
+ requestDbclient.updateInfraActiveRequests(request);
+ } catch(Exception ex){
+ msoLogger.debug(ex.toString());
+ msoLogger.error("Failed to update Request Db Infra Active Requests with Retry Status");
+ }
+ }
if(handlingCode.equals("RollbackToAssigned")&&!aLaCarte){
handlingCode = "Rollback";
}