From 7ded7cc8a1c4282e4cc84d4f82f73491f0bf3f08 Mon Sep 17 00:00:00 2001 From: c00149107 Date: Sat, 21 Apr 2018 15:40:05 +0800 Subject: Recipe param xsd support Recipe param xsd support Change-Id: I561d98358a76f1007b979cdf6753d2f3b7754991 Issue-ID: SO-583 Signed-off-by: c00149107 --- .../bpmn/infrastructure/scripts/CreateVFCNSResource.groovy | 2 ++ .../workflow/serviceTask/AbstractSdncOperationTask.java | 14 ++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'bpmn/MSOInfrastructureBPMN/src/main') diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy index ca32420b73..9f3910beed 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy @@ -80,6 +80,8 @@ public class CreateVFCNSResource extends AbstractServiceTaskProcessor { //deal with operation key String globalSubscriberId = jsonUtil.getJsonValue(resourceInput, "globalSubscriberId") utils.log("INFO", "globalSubscriberId:" + globalSubscriberId, isDebugEnabled) + //set local globalSubscriberId variable + execution.setVariable("globalSubscriberId", globalSubscriberId); String serviceType = execution.getVariable("serviceType") utils.log("INFO", "serviceType:" + serviceType, isDebugEnabled) diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java index 0aeb0c6310..25141a0c40 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java +++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java @@ -84,13 +84,14 @@ public abstract class AbstractSdncOperationTask extends BaseTask { private void updateResOperStatus(ResourceOperationStatus resourceOperationStatus) throws RouteException { logger.info("AbstractSdncOperationTask.updateResOperStatus begin!"); - String url = "http://mso:8080/dbadapters/RequestsDbAdapter"; - HttpPost httpPost = new HttpPost(url); + Map properties = PropertyConfiguration.getInstance().getProperties("mso.bpmn.urn.properties"); + String requestsdbEndPoint = properties.get("mso.adapters.openecomp.db.endpoint"); + HttpPost httpPost = new HttpPost(requestsdbEndPoint); httpPost.addHeader("Authorization", "Basic QlBFTENsaWVudDpwYXNzd29yZDEk"); httpPost.addHeader("Content-type", "application/soap+xml"); String postBody = getPostStringBody(resourceOperationStatus); httpPost.setEntity(new StringEntity(postBody, ContentType.APPLICATION_XML)); - httpPost(url, httpPost); + httpPost(requestsdbEndPoint, httpPost); logger.info("AbstractSdncOperationTask.updateResOperStatus end!"); } @@ -165,13 +166,14 @@ public abstract class AbstractSdncOperationTask extends BaseTask { private ResourceOperationStatus getResourceOperationStatus(String serviceId, String operationId, String resourceTemplateUUID) throws RouteException { logger.info("AbstractSdncOperationTask.getResourceOperationStatus begin!"); - String url = "http://mso:8080/dbadapters/RequestsDbAdapter"; - HttpPost httpPost = new HttpPost(url); + Map properties = PropertyConfiguration.getInstance().getProperties("mso.bpmn.urn.properties"); + String requestsdbEndPoint = properties.get("mso.adapters.openecomp.db.endpoint"); + HttpPost httpPost = new HttpPost(requestsdbEndPoint); httpPost.addHeader("Authorization", "Basic QlBFTENsaWVudDpwYXNzd29yZDEk"); httpPost.addHeader("Content-type", "application/soap+xml"); String getBody = getGetStringBody(serviceId, operationId, resourceTemplateUUID); httpPost.setEntity(new StringEntity(getBody, ContentType.APPLICATION_XML)); - String result = httpPost(url, httpPost); + String result = httpPost(requestsdbEndPoint, httpPost); ResourceOperationStatus resourceOperationStatus = getResourceOperationStatusFromXmlString(result); logger.info("AbstractSdncOperationTask.getResourceOperationStatus end!"); return resourceOperationStatus; -- cgit 1.2.3-korg