From 1208bda04f54b727cef27f4b7a7cb611c833c67d Mon Sep 17 00:00:00 2001 From: Abhishek Shekhar Date: Mon, 11 Sep 2017 18:25:30 +0530 Subject: 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 --- .../bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy | 8 +++++--- .../resources/process/CreateGenericALaCarteServiceInstance.bpmn | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'bpmn/MSOInfrastructureBPMN') 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 -- cgit 1.2.3-korg