diff options
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src/main/groovy')
3 files changed, 18 insertions, 13 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy index 1464aedc5c..3903e12ba2 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy @@ -129,17 +129,20 @@ public class CreateCustomE2EServiceInstance extends AbstractServiceTaskProcessor Map reqMap = jsonSlurper.parseText(siRequest)
//InputParams
- def userParams = reqMap.requestDetails?.requestParameters?.userParams
+ def userParamsList = reqMap.requestDetails?.requestParameters?.userParams
Map<String, String> inputMap = [:]
- if (userParams) {
- userParams.each {
- userParam -> inputMap.put(userParam.name, userParam.value.toString())
+ if (userParamsList) {
+ for (def i=0; i<userParamsList.size(); i++) {
+ def userParams1 = userParamsList.get(i)
+ userParams1.each { param -> inputMap.put(param.key, param.value)}
}
}
+
- utils.log("DEBUG", "User Input Parameters map: " + userParams.toString(), isDebugEnabled)
+ utils.log("DEBUG", "User Input Parameters map: " + inputMap.toString(), isDebugEnabled)
execution.setVariable("serviceInputParams", inputMap)
+ execution.setVariable("uuiRequest", inputMap.get("UUIRequest"))
execution.setVariable("URN_mso_adapters_openecomp_db_endpoint","http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter")
//TODO
//execution.setVariable("serviceInputParams", jsonUtil.getJsonValue(siRequest, "requestDetails.requestParameters.userParams"))
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy index 4ad58fb669..267673d9fd 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy @@ -137,8 +137,8 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor { String serviceInstanceName = execution.getVariable("serviceInstanceName") String serviceInstanceId = execution.getVariable("serviceInstanceId") String uuiRequest = execution.getVariable("uuiRequest") - String modelInvariantUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceDefId") - String modelUuid = jsonUtil.getJsonValue(uuiRequest, "service.templateId") + String modelInvariantUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceInvariantUuid") + String modelUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceUuid") String serviceModelName = jsonUtil.getJsonValue(uuiRequest, "service.parameters.templateName") execution.setVariable("serviceModelName", serviceModelName) //aai serviceType and Role can be setted as fixed value now. @@ -189,7 +189,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor { def isDebugEnabled=execution.getVariable("isDebugLogEnabled") try { - utils.log("DEBUG", " ***** Inside prepareDecomposeService of create generic e2e service ***** ", isDebugEnabled) + utils.log("INFO", " ***** Inside prepareDecomposeService of create generic e2e service ***** ", isDebugEnabled) String modelInvariantUuid = execution.getVariable("modelInvariantUuid") String modelUuid = execution.getVariable("modelUuid") //here modelVersion is not set, we use modelUuid to decompose the service. @@ -211,12 +211,12 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor { public void processDecomposition(DelegateExecution execution) { def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - utils.log("DEBUG", " ***** Inside processDecomposition() of create generic e2e service flow ***** ", isDebugEnabled) + utils.log("INFO", " ***** Inside processDecomposition() of create generic e2e service flow ***** ", isDebugEnabled) try { ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition") } catch (Exception ex) { String exceptionMessage = "Bpmn error encountered in create generic e2e service flow. processDecomposition() - " + ex.getMessage() - utils.log("DEBUG", exceptionMessage, isDebugEnabled) + utils.log("INFO", exceptionMessage, isDebugEnabled) exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) } } @@ -396,7 +396,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor { utils.log("INFO", " ======== STARTED preInitResourcesOperStatus Process ======== ", isDebugEnabled) try{ String serviceId = execution.getVariable("serviceInstanceId") - String operationId = execution.getVariable("operationId") + String operationId = execution.getVariable("msoRequestId") String operationType = execution.getVariable("operationType") String resourceTemplateUUIDs = "" String result = "processing" 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 a53540ac89..93f86592ab 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 @@ -137,6 +137,7 @@ public class DoCreateResources extends AbstractServiceTaskProcessor def currentIndex = execution.getVariable("currentResourceIndex") List<Resource> sequencedResourceList = execution.getVariable("sequencedResourceList") Resource currentResource = sequencedResourceList.get(currentIndex) + execution.setVariable("resourceType", currentResource.getModelInfo().getModelName()) utils.log("INFO", "Now we deal with resouce:" + currentResource.getModelInfo().getModelName(), isDebugEnabled) utils.log("INFO", "======== COMPLETED getCurrentResoure Process ======== ", isDebugEnabled) } @@ -161,6 +162,7 @@ public class DoCreateResources extends AbstractServiceTaskProcessor utils.log("INFO", "======== Start prepareResourceRecipeRequest Process ======== ", isDebugEnabled) ResourceInput resourceInput = new ResourceInput() String serviceInstanceName = execution.getVariable("serviceInstanceName") + String resourceType = execution.getVariable("resourceType") String resourceInstanceName = resourceType + "_" + serviceInstanceName resourceInput.setResourceInstanceName(resourceInstanceName) utils.log("INFO", "Prepare Resource Request resourceInstanceName:" + resourceInstanceName, isDebugEnabled) @@ -183,8 +185,8 @@ public class DoCreateResources extends AbstractServiceTaskProcessor String incomingRequest = execution.getVariable("uuiRequest") //set the requestInputs from tempalte To Be Done - String serviceModelUuid = execution.getVariable("modelUuid") - String serviceParameters = jsonUtil.getJsonValue(incomingRequest, "service.parameters") + String serviceModelUuid = jsonUtil.getJsonValue(incomingRequest,"service.serviceUuid") + String serviceParameters = jsonUtil.getJsonValue(incomingRequest, "service.parameters") String resourceParameters = ResourceRequestBuilder.buildResourceRequestParameters(execution, serviceModelUuid, resourceCustomizationUuid, serviceParameters) resourceInput.setResourceParameters(resourceParameters) execution.setVariable("resourceInput", resourceInput) |