* ============LICENSE_END=========================================================
*/
-package com.att.bpm.scripts
+package org.openecomp.mso.bpmn.infrastructure.scripts
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil;
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil;
+import org.openecomp.mso.bpmn.common.scripts.VidUtils;
import org.openecomp.mso.bpmn.core.WorkflowException
import org.openecomp.mso.rest.APIResponse
+
import groovy.json.JsonSlurper
+
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.runtime.Execution;
import org.apache.commons.lang3.*
public void sendSyncResponse (Execution execution, isDebugEnabled) {
def volumeGroupId = execution.getVariable(prefix+'volumeGroupId')
- def requestId = execution.getVariable("att-mso-request-id")
+ def requestId = execution.getVariable("mso-request-id")
def serviceInstanceId = execution.getVariable("serviceInstanceId")
String syncResponse = """{"requestReferences":{"instanceId":"${volumeGroupId}","requestId":"${requestId}"}}""".trim()
public void prepareDbInfraSuccessRequest(Execution execution, isDebugEnabled) {
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
def dbVnfOutputs = execution.getVariable(prefix+'volumeOutputs')
- def requestId = execution.getVariable('att-mso-request-id')
+ def requestId = execution.getVariable('mso-request-id')
def statusMessage = "VolumeGroup successfully created."
def requestStatus = "COMPLETED"
def progress = "100"
+ try {
+ String basicAuthValueDB = execution.getVariable("URN_mso_adapters_db_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugEnabled)
+
+ def encodedString = utils.getBasicAuth(basicAuthValueDB, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValueDB",encodedString)
+ } catch (IOException ex) {
+ String dataErrorMessage = " Unable to encode Catalog DB user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
/*
from: $gVolumeGroup/aai:volume-group-id/text()
to: vnfreq:volume-outputs/vnfreq:volume-group-id
"""<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
- <ns:updateInfraRequest xmlns:ns="http://com.att.mso/requestsdb">
+ <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb">
<requestId>${requestId}</requestId>
<lastModifiedBy>BPMN</lastModifiedBy>
<statusMessage>${statusMessage}</statusMessage>
utils.logAudit('DB return code: ' + dbReturnCode)
utils.logAudit('DB response: ' + createDBResponse)
- def requestId = execution.getVariable("att-mso-request-id")
+ def requestId = execution.getVariable("mso-request-id")
def source = execution.getVariable(prefix+'source')
String msoCompletionRequest =
- """<aetgt:MsoCompletionRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:ns="http://ecomp.att.com/mso/request/types/v1">
- <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
<request-id>${requestId}</request-id>
<action>CREATE</action>
<source>${source}</source>
def errorCode = we?.getErrorCode()
def errorMessage = we?.getErrorMessage()
- def requestId = execution.getVariable("att-mso-request-id")
+ def requestId = execution.getVariable("mso-request-id")
def source = execution.getVariable(prefix+'source')
String falloutHandlerRequest =
- """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
- xmlns:wfsch="http://ecomp.att.com/mso/workflow/schema/v1">
- <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
<request-id>${requestId}</request-id>
<action>CREATE</action>
<source>${source}</source>