summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOInfrastructureBPMN/src/main/groovy
diff options
context:
space:
mode:
authorAbhishek Shekhar <abhishek.shekhar1@amdocs.com>2017-09-11 18:25:30 +0530
committerAbhishek Shekhar <abhishek.shekhar1@amdocs.com>2017-09-11 18:25:30 +0530
commit1208bda04f54b727cef27f4b7a7cb611c833c67d (patch)
treeac5a9882a593ebccf36d3ad07efdf3e092781310 /bpmn/MSOInfrastructureBPMN/src/main/groovy
parent6499279d7517752aab7bbfa42e16e42fdbfde28a (diff)
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 <abhishek.shekhar1@amdocs.com>
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src/main/groovy')
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy8
1 files changed, 5 insertions, 3 deletions
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) ? "" : "<orchestration-status>${oStatus}</orchestration-status>"
AaiUtil aaiUriUtil = new AaiUtil(this)
String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
@@ -264,7 +266,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
<service-instance-name>${serviceInstanceName}</service-instance-name>
<service-type>${serviceType}</service-type>
<service-role>${serviceRole}</service-role>
- <orchestration-status>${oStatus}</orchestration-status>
+ ${statusLine}
<model-invariant-id>${modelInvariantUuid}</model-invariant-id>
<model-version-id>${modelUuid}</model-version-id>
</service-instance>""".trim()