summaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-infrastructure-common/src/main
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2019-06-07 20:28:02 -0400
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-06-08 09:58:45 -0400
commit242e71883f59b8ad971f77c9bbdf032527fd77c0 (patch)
tree04c9c5529aa9784b10564c91bc37afb3a734e169 /bpmn/so-bpmn-infrastructure-common/src/main
parent8534e7a2ce76697fd22f5909c907f22d302e0099 (diff)
parentd0cd4dc3d204e80a7419c97b6b0ec59273984a99 (diff)
Merge remote-tracking branch 'origin/dublin' into 'origin/master'
Change-Id: Ib8eaae7ee4a404bde568803afaf6c4e183cbbd53 Issue-ID: SO-2004 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common/src/main')
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HandlePNF.groovy38
2 files changed, 39 insertions, 1 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy
index ef0dba83df..a9d70ccc4e 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy
@@ -356,7 +356,7 @@ public class CreateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
}
if (allActive){
- si.setOrchestrationStatus("Active")
+ si.setOrchestrationStatus("Assigned")
}else {
si.setOrchestrationStatus("Pending")
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HandlePNF.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HandlePNF.groovy
index f06d71cec4..cbeb1d3d69 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HandlePNF.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HandlePNF.groovy
@@ -22,8 +22,12 @@ package org.onap.so.bpmn.infrastructure.scripts
import org.apache.commons.lang3.StringUtils
import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.onap.so.bpmn.common.recipe.ResourceInput
+import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.UrnPropertiesReader
import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames
import org.slf4j.Logger
@@ -34,6 +38,8 @@ public class HandlePNF extends AbstractServiceTaskProcessor{
ExceptionUtil exceptionUtil = new ExceptionUtil()
JsonUtils jsonUtil = new JsonUtils()
+ MsoUtils msoUtils = new MsoUtils()
+ String Prefix="CRESI_"
@Override
void preProcessRequest(DelegateExecution execution) {
@@ -65,7 +71,33 @@ public class HandlePNF extends AbstractServiceTaskProcessor{
void postProcessRequest(DelegateExecution execution) {
logger.debug("start postProcess for HandlePNF")
+ ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(execution.getVariable("resourceInput"), ResourceInput.class)
+ String operType = resourceInputObj.getOperationType()
+ String resourceCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
+ String serviceInstanceId = resourceInputObj.getServiceInstanceId()
+ String operationId = resourceInputObj.getOperationId()
+ String progress = "100"
+ String status = "finished"
+ String statusDescription = "SDCN resource creation and activation completed"
+ String body = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateResourceOperationStatus>
+ <operType>${msoUtils.xmlEscape(operType)}</operType>
+ <operationId>${msoUtils.xmlEscape(operationId)}</operationId>
+ <progress>${msoUtils.xmlEscape(progress)}</progress>
+ <resourceTemplateUUID>${msoUtils.xmlEscape(resourceCustomizationUuid)}</resourceTemplateUUID>
+ <serviceId>${msoUtils.xmlEscape(serviceInstanceId)}</serviceId>
+ <status>${msoUtils.xmlEscape(status)}</status>
+ <statusDescription>${msoUtils.xmlEscape(statusDescription)}</statusDescription>
+ </ns:updateResourceOperationStatus>
+ </soapenv:Body>
+ </soapenv:Envelope>""";
+ logger.debug("body: "+body)
+ setProgressUpdateVariables(execution, body)
logger.debug("exit postProcess for HandlePNF")
}
@@ -87,4 +119,10 @@ public class HandlePNF extends AbstractServiceTaskProcessor{
}
logger.debug(" ***** Exit sendSyncResponse *****")
}
+
+ private void setProgressUpdateVariables(DelegateExecution execution, String body) {
+ def dbAdapterEndpoint = UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint", execution)
+ execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
+ execution.setVariable("CVFMI_updateResOperStatusRequest", body)
+ }
}