From be24ada950e9f41a6034b472fc5502b285a510d5 Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Sat, 10 Nov 2018 11:58:39 -0500 Subject: separate error status from progression status Re-ordered statuses, capitalized, and added delimiters added retrystatusmessage to to string in infrarequests Added retryStatusMessage to OrchestrationRequests removed the word min from retry status message string added retry status message to infra active requests Began adding retryStatusMessage Added rollback status and flow status to status message added flow status table to separate errors from status Change-Id: If756fa4523955e4e4b6bfd10aad730b715892b62 Issue-ID: SO-1205 Signed-off-by: Benjamin, Max (mb388a) --- .../tasks/ExecuteBuildingBlockRainyDay.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'bpmn/MSOCommonBPMN/src') 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 lookupKeyMap = (Map) 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"; } -- cgit 1.2.3-korg