diff options
author | Yulian Han <elaine.hanyulian@huawei.com> | 2018-03-19 19:16:18 +0800 |
---|---|---|
committer | Yulian Han <elaine.hanyulian@huawei.com> | 2018-03-20 03:02:08 +0000 |
commit | 97db31af8c6bbc344af91cf791e787969f4c3d66 (patch) | |
tree | c58c8cd71ca39a59e3a17465ce8241bc4900ad64 /bpmn/MSOInfrastructureBPMN/src/main/groovy | |
parent | e36b713d9a23cc20dc84644f72d7c87e5d9926ad (diff) |
modify review questions DoCreateResources.groovy
Change-Id: Idaa55084f5ecb0dd3636c232cebc14fa5f0641d5
Issue-ID: SO-419
Signed-off-by: Yulian Han <elaine.hanyulian@huawei.com>
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src/main/groovy')
-rw-r--r-- | bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateResources.groovy | 18 |
1 files changed, 5 insertions, 13 deletions
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<Resource> addResourceList = execution.getVariable("addResourceList") |