From 97db31af8c6bbc344af91cf791e787969f4c3d66 Mon Sep 17 00:00:00 2001 From: Yulian Han Date: Mon, 19 Mar 2018 19:16:18 +0800 Subject: modify review questions DoCreateResources.groovy Change-Id: Idaa55084f5ecb0dd3636c232cebc14fa5f0641d5 Issue-ID: SO-419 Signed-off-by: Yulian Han --- .../infrastructure/scripts/DoCreateResources.groovy | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'bpmn/MSOInfrastructureBPMN/src/main/groovy/org') diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateResources.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateResources.groovy index 809771561a..07f13767ba 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateResources.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateResources.groovy @@ -55,17 +55,14 @@ import org.openecomp.mso.bpmn.core.json.JsonUtils * @param - serviceInstanceName - O * @param - serviceInputParams (should contain aic_zone for serviceTypes TRANSPORT,ATM) * @param - sdncVersion - * @param - failNotFound - TODO - * @param - serviceInputParams - TODO * * @param - addResourceList * * Outputs: * @param - WorkflowException - * - * Rollback - Deferred + */ -public class DoCreateResources extends AbstractServiceTaskProcessor +public class DoCreateResources extends AbstractServiceTaskProcessor { ExceptionUtil exceptionUtil = new ExceptionUtil() JsonUtils jsonUtil = new JsonUtils() @@ -76,14 +73,14 @@ public class DoCreateResources extends AbstractServiceTaskProcessor utils.log("INFO"," ***** preProcessRequest *****", isDebugEnabled) String msg = "" - List addResourceList = execution.getVariable("addResourceList") + List addResourceList = execution.getVariable("addResourceList") if (addResourceList == null) { msg = "Input addResourceList is null" utils.log("INFO", msg, isDebugEnabled) exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg) } - if (addResourceList.size() == 0) + else if (addResourceList.size() == 0) { msg = "No resource in addResourceList" utils.log("INFO", msg, isDebugEnabled) @@ -95,13 +92,8 @@ public class DoCreateResources extends AbstractServiceTaskProcessor { def isDebugEnabled = execution.getVariable("isDebugLogEnabled") utils.log("INFO", "======== Start sequenceResoure Process ======== ", isDebugEnabled) - String serviceModelUUID = execution.getVariable("modelUuid") - JSONArray networks = cutils.getAllNetworksByServiceModelUuid(execution, serviceModelUUID) - utils.log("DEBUG", "obtained Network list: "+ networks, isDebugEnabled) - if (networks == null) { - utils.log("INFO", "No matching networks in Catalog DB for serviceModelUUID=" + serviceModelUUID, isDebugEnabled) - } + String serviceModelUUID = execution.getVariable("modelUuid") List addResourceList = execution.getVariable("addResourceList") -- cgit 1.2.3-korg