diff options
author | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2018-11-10 11:58:39 -0500 |
---|---|---|
committer | Rob Daugherty <rd472p@att.com> | 2018-11-14 20:55:02 +0000 |
commit | be24ada950e9f41a6034b472fc5502b285a510d5 (patch) | |
tree | 76c71f33776386eecf04230882b89a81f904f3fa /bpmn/MSOCommonBPMN/src/main | |
parent | 78e9c0c84da529b26f25ab66c4d2e596fd180282 (diff) |
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) <mb388a@us.att.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main')
-rw-r--r-- | bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java | 15 |
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"; } |