From: Abhishek Shekhar Date: Mon, 11 Sep 2017 12:55:30 +0000 (+0530) Subject: Fix hardcoded orchestration-status X-Git-Tag: v1.1.0~366^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F95%2F10595%2F3;p=so.git Fix hardcoded orchestration-status While creating a service-instance orchestration-status is hardcoded to be Active. The user should be allowed to set the initial status. Issue-id: SO-108 Change-Id: Ica6febae1f7733125126b49f4f7e0e23bba2a0f2 Signed-off-by: Abhishek Shekhar --- diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy index 49aa948c44..0b0070f214 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy @@ -248,13 +248,15 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor { if (siParamsXml == null) siParamsXml = "" execution.setVariable("siParamsXml", siParamsXml) - + //AAI PUT - String oStatus= "Active" + String oStatus = execution.getVariable("initialStatus") ?: "" if ("TRANSPORT".equalsIgnoreCase(serviceType)) { oStatus = "Created" } + + String statusLine = isBlank(oStatus) ? "" : "${oStatus}" AaiUtil aaiUriUtil = new AaiUtil(this) String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution) @@ -264,7 +266,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor { ${serviceInstanceName} ${serviceType} ${serviceRole} - ${oStatus} + ${statusLine} ${modelInvariantUuid} ${modelUuid} """.trim() diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateGenericALaCarteServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateGenericALaCarteServiceInstance.bpmn index dbd40c072e..acf380f866 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateGenericALaCarteServiceInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateGenericALaCarteServiceInstance.bpmn @@ -1,5 +1,5 @@ - + SequenceFlow_0lp2z7l @@ -39,6 +39,7 @@ ex.processJavaException(execution)]]> + SequenceFlow_0eto8sn SequenceFlow_1lj31zp