2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.onap.so.bpmn.infrastructure.scripts
23 import static org.apache.commons.lang3.StringUtils.*;
25 import org.camunda.bpm.engine.delegate.BpmnError
26 import org.camunda.bpm.engine.delegate.DelegateExecution;
27 import org.json.JSONArray;
28 import org.json.JSONObject;
29 import org.onap.so.bpmn.common.scripts.AaiUtil
30 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
31 import org.onap.so.bpmn.common.scripts.ExceptionUtil
32 import org.onap.so.bpmn.common.scripts.MsoUtils
33 import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
34 import org.onap.so.bpmn.common.scripts.VidUtils
35 import org.onap.so.bpmn.core.UrnPropertiesReader
36 import org.onap.so.bpmn.core.WorkflowException
37 import org.onap.so.bpmn.core.domain.ModelInfo
38 import org.onap.so.bpmn.core.domain.ModuleResource
39 import org.onap.so.bpmn.core.domain.ServiceDecomposition
40 import org.onap.so.bpmn.core.domain.VnfResource
41 import org.onap.so.bpmn.core.json.JsonUtils
42 import org.onap.so.logger.MessageEnum
43 import org.onap.so.logger.MsoLogger
44 import org.onap.so.rest.APIResponse
45 import org.springframework.web.util.UriUtils;
48 * This class supports the macro VID Flow
49 * with the deletion of a generic vnf and related VF modules.
51 class DoDeleteVnfAndModules extends AbstractServiceTaskProcessor {
52 private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoDeleteVnfAndModules.class);
54 String Prefix="DDVAM_"
55 ExceptionUtil exceptionUtil = new ExceptionUtil()
56 JsonUtils jsonUtil = new JsonUtils()
57 VidUtils vidUtils = new VidUtils(this)
58 SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
61 * This method gets and validates the incoming
67 public void preProcessRequest(DelegateExecution execution) {
69 execution.setVariable("prefix",Prefix)
70 msoLogger.trace("STARTED DoDeleteVnfAndModules PreProcessRequest Process")
75 String cloudConfiguration = execution.getVariable("cloudConfiguration")
76 msoLogger.debug("Cloud Configuration: " + cloudConfiguration)
78 String requestId = execution.getVariable("msoRequestId")
79 execution.setVariable("requestId", requestId)
80 execution.setVariable("mso-request-id", requestId)
81 msoLogger.debug("Incoming Request Id is: " + requestId)
83 String serviceInstanceId = execution.getVariable("serviceInstanceId")
84 msoLogger.debug("Incoming Service Instance Id is: " + serviceInstanceId)
86 String vnfId = execution.getVariable("vnfId")
87 msoLogger.debug("Incoming Vnf Id is: " + vnfId)
90 execution.setVariable("DDVAM_source", source)
91 msoLogger.debug("Incoming Source is: " + source)
93 execution.setVariable("DDVAM_isVidRequest", "true")
95 String sdncVersion = execution.getVariable("sdncVersion")
96 if (sdncVersion == null) {
99 execution.setVariable("DDVAM_sdncVersion", sdncVersion)
100 msoLogger.debug("Incoming Sdnc Version is: " + sdncVersion)
102 // Set aLaCarte flag to false
103 execution.setVariable("aLaCarte", false)
105 String sdncCallbackUrl = (String) UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback", execution)
106 if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
107 def msg = 'Required variable \'mso.workflow.sdncadapter.callback\' is missing'
108 msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, msg, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception");
109 exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
111 execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
112 msoLogger.debug("SDNC Callback URL: " + sdncCallbackUrl)
113 msoLogger.debug("SDNC Callback URL is: " + sdncCallbackUrl)
116 if (!sdncVersion.equals("1702")) {
117 //String vnfModelInfo = execution.getVariable("vnfModelInfo")
118 //String serviceModelInfo = execution.getVariable("serviceModelInfo")
120 String serviceId = execution.getVariable("productFamilyId")
121 execution.setVariable("DDVAM_serviceId", serviceId)
122 msoLogger.debug("Incoming Service Id is: " + serviceId)
125 //String modelInvariantId = jsonUtil.getJsonValue(vnfModelInfo, "modelInvariantId")
126 //execution.setVariable("DDVAM_modelInvariantId", modelInvariantId)
127 //msoLogger.debug("Incoming Invariant Id is: " + modelInvariantId)
129 //String modelVersionId = jsonUtil.getJsonValue(vnfModelInfo, "modelVersionId")
130 //if (modelVersionId == null) {
131 // modelVersionId = ""
133 //execution.setVariable("DDVAM_modelVersionId", modelVersionId)
134 //msoLogger.debug("Incoming Version Id is: " + modelVersionId)
136 //String modelVersion = jsonUtil.getJsonValue(vnfModelInfo, "modelVersion")
137 //execution.setVariable("DDVAM_modelVersion", modelVersion)
138 //msoLogger.debug("Incoming Model Version is: " + modelVersion)
140 //String modelName = jsonUtil.getJsonValue(vnfModelInfo, "modelName")
141 //execution.setVariable("DDVAM_modelName", modelName)
142 //msoLogger.debug("Incoming Model Name is: " + modelName)
144 //String modelCustomizationId = jsonUtil.getJsonValue(vnfModelInfo, "modelCustomizationId")
145 //if (modelCustomizationId == null) {
146 // modelCustomizationId = ""
148 //execution.setVariable("DDVAM_modelCustomizationId", modelCustomizationId)
149 //msoLogger.debug("Incoming Model Customization Id is: " + modelCustomizationId)
151 String cloudSiteId = execution.getVariable("lcpCloudRegionId")
152 execution.setVariable("DDVAM_cloudSiteId", cloudSiteId)
153 msoLogger.debug("Incoming Cloud Site Id is: " + cloudSiteId)
155 String tenantId = execution.getVariable("tenantId")
156 execution.setVariable("DDVAM_tenantId", tenantId)
157 msoLogger.debug("Incoming Tenant Id is: " + tenantId)
159 String globalSubscriberId = execution.getVariable("globalSubscriberId")
160 if (globalSubscriberId == null) {
161 globalSubscriberId = ""
163 execution.setVariable("DDVAM_globalSubscriberId", globalSubscriberId)
164 msoLogger.debug("Incoming Global Subscriber Id is: " + globalSubscriberId)
167 execution.setVariable("DDVAM_vfModulesFromDecomposition", null)
168 // Retrieve serviceDecomposition if present
169 ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
170 if (serviceDecomposition != null) {
171 msoLogger.debug("Getting Catalog DB data from ServiceDecomposition object: " + serviceDecomposition.toJsonString())
172 List<VnfResource> vnfs = serviceDecomposition.getVnfResources()
173 msoLogger.debug("Read vnfs")
175 msoLogger.debug("Error - vnfs are empty in serviceDecomposition object")
176 exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in preProcessRequest - vnfs are empty")
178 VnfResource vnf = vnfs[0]
181 msoLogger.debug("Error - vnf is empty in serviceDecomposition object")
182 exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in preProcessRequest - vnf is empty")
185 List<ModuleResource> vfModules = vnf.getAllVfModuleObjects()
187 execution.setVariable("DDVAM_vfModulesFromDecomposition", vfModules)
190 execution.setVariable("DDVAM_moduleCount", 0)
191 execution.setVariable("DDVAM_nextModule", 0)
195 msoLogger.debug("Rethrowing MSOWorkflowException")
198 msoLogger.debug(" Error Occured in DoCreateVnfAndModules PreProcessRequest method!" + e.getMessage())
199 exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf PreProcessRequest")
202 msoLogger.trace("COMPLETED DoDeleteVnfAndModules PreProcessRequest Process ")
207 public void preProcessAddOnModule(DelegateExecution execution){
209 execution.setVariable("prefix", Prefix)
210 msoLogger.trace("STARTED preProcessAddOnModule ")
213 JSONArray addOnModules = (JSONArray) execution.getVariable("addOnModules")
214 int addOnIndex = (int) execution.getVariable("addOnModulesDeployed")
216 JSONObject addOnModule = addOnModules[addOnIndex]
218 def newVfModuleId = UUID.randomUUID().toString()
219 execution.setVariable("addOnVfModuleId", newVfModuleId)
221 execution.setVariable("instancesOfThisModelDeployed", 0)
223 JSONObject addOnVfModuleModelInfoObject = jsonUtil.getJsonValueForKey(addOnModule, "modelInfo")
224 String addOnVfModuleModelInfo = addOnVfModuleModelInfoObject.toString()
225 execution.setVariable("addOnVfModuleModelInfo", addOnVfModuleModelInfo)
226 String addOnVfModuleLabel = jsonUtil.getJsonValueForKey(addOnModule, "vfModuleLabel")
227 execution.setVariable("addOnVfModuleLabel", addOnVfModuleLabel)
228 String addOnPersonaModelId = jsonUtil.getJsonValueForKey(addOnVfModuleModelInfoObject, "modelInvariantUuid")
229 execution.setVariable("addOnPersonaModelId", addOnPersonaModelId)
230 String addOnInitialCount = jsonUtil.getJsonValueForKey(addOnModule, "initialCount")
231 execution.setVariable("initialCount", addOnInitialCount)
235 msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing preProcessAddOnModule." + e, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
236 exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessAddOnModule Method:\n" + e.getMessage())
238 msoLogger.trace("COMPLETED preProcessSDNCAssignRequest ")
242 * Using the received vnfId and vfModuleId, query AAI to get the corresponding VNF info.
243 * A 200 response is expected with the VNF info in the response body. Will find out the base module info.
245 * @param execution The flow's execution instance.
247 public void queryAAIVfModule(DelegateExecution execution) {
249 def method = getClass().getSimpleName() + '.queryAAIVfModule(' +
250 'execution=' + execution.getId() +
252 msoLogger.trace('Entered ' + method)
255 def vnfId = execution.getVariable('vnfId')
257 AaiUtil aaiUriUtil = new AaiUtil(this)
258 String aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
259 msoLogger.debug('AAI URI is: ' + aai_uri)
261 String endPoint = UrnPropertiesReader.getVariable("aai.endpoint", execution) + "${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8") + "?depth=1"
262 msoLogger.debug("AAI endPoint: " + endPoint)
265 msoLogger.debug("createVfModule - invoking httpGet() to AAI")
266 APIResponse response = aaiUriUtil.executeAAIGetCall(execution, endPoint)
268 def responseData = response.getResponseBodyAsString()
269 if (responseData != null) {
270 msoLogger.debug("Received generic VNF data: " + responseData)
274 msoLogger.debug("createVfModule - queryAAIVfModule Response: " + responseData)
275 msoLogger.debug("createVfModule - queryAAIVfModule ResponseCode: " + response.getStatusCode())
277 execution.setVariable('DCVFM_queryAAIVfModuleResponseCode', response.getStatusCode())
278 execution.setVariable('DCVFM_queryAAIVfModuleResponse', responseData)
279 msoLogger.debug('Response code:' + response.getStatusCode())
280 msoLogger.debug('Response:' + System.lineSeparator() + responseData)
281 //Map<String, String>[] vfModules = new HashMap<String,String>[]
282 List<ModuleResource> vfModulesFromDecomposition = execution.getVariable("DDVAM_vfModulesFromDecomposition")
283 def vfModulesList = new ArrayList<Map<String,String>>()
285 def vfModuleBaseEntry = null
286 if (response.getStatusCode() == 200) {
287 // Parse the VNF record from A&AI to find base module info
288 msoLogger.debug('Parsing the VNF data to find base module info')
289 if (responseData != null) {
290 def vfModulesText = utils.getNodeXml(responseData, "vf-modules")
291 msoLogger.debug("vModulesText: " + vfModulesText)
292 if (vfModulesText != null && !vfModulesText.trim().isEmpty()) {
293 def xmlVfModules= new XmlSlurper().parseText(vfModulesText)
294 vfModules = xmlVfModules.'**'.findAll {it.name() == "vf-module"}
295 execution.setVariable("DDVAM_moduleCount", vfModules.size())
296 int vfModulesSize = 0
297 ModelInfo vfModuleModelInfo = null
298 for (i in 0..vfModules.size()-1) {
299 def vfModuleXml = groovy.xml.XmlUtil.serialize(vfModules[i])
301 Map<String, String> vfModuleEntry = new HashMap<String, String>()
302 def vfModuleId = utils.getNodeText(vfModuleXml, "vf-module-id")
303 vfModuleEntry.put("vfModuleId", vfModuleId)
304 def vfModuleName = utils.getNodeText(vfModuleXml, "vf-module-name")
305 vfModuleEntry.put("vfModuleName", vfModuleName)
307 // Find the model for this vf module in decomposition if specified
308 if (vfModulesFromDecomposition != null) {
309 msoLogger.debug("vfModulesFromDecomposition is not null")
310 def vfModuleUuid = utils.getNodeText(vfModuleXml, "model-version-id")
311 if (vfModuleUuid == null) {
312 vfModuleUuid = utils.getNodeText(vfModuleXml, "persona-model-version")
314 msoLogger.debug("vfModule UUID is: " + vfModuleUuid)
315 for (j in 0..vfModulesFromDecomposition.size()-1) {
316 ModuleResource mr = vfModulesFromDecomposition[j]
317 if (mr.getModelInfo().getModelUuid() == vfModuleUuid) {
318 msoLogger.debug("Found modelInfo")
319 vfModuleModelInfo = mr.getModelInfo()
325 if (vfModuleModelInfo != null) {
326 String vfModuleModelInfoString = vfModuleModelInfo.toString()
327 def vfModuleModelInfoValue = jsonUtil.getJsonValue(vfModuleModelInfoString, "modelInfo")
328 vfModuleEntry.put("vfModuleModelInfo", vfModuleModelInfoValue)
331 vfModuleEntry.put("vfModuleModelInfo", null)
335 def isBaseVfModule = utils.getNodeText(vfModuleXml, "is-base-vf-module")
336 // Save base vf module for last
337 if (isBaseVfModule == "true") {
338 vfModuleBaseEntry = vfModuleEntry
341 vfModulesList.add(vfModuleEntry)
344 if (vfModuleBaseEntry != null) {
345 vfModulesList.add(vfModuleBaseEntry)
351 execution.setVariable("DDVAM_vfModules", vfModulesList)
352 } catch (Exception ex) {
354 msoLogger.debug('Exception occurred while executing AAI GET:' + ex.getMessage())
355 exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'AAI GET Failed:' + ex.getMessage())
357 msoLogger.trace('Exited ' + method)
358 } catch (BpmnError e) {
360 } catch (Exception e) {
361 msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
362 exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryAAIVfModule(): ' + e.getMessage())
366 public void prepareNextModuleToDelete(DelegateExecution execution){
368 execution.setVariable("prefix", Prefix)
369 msoLogger.trace("STARTED prepareNextModuleToDelete ")
372 int i = execution.getVariable("DDVAM_nextModule")
373 def vfModules = execution.getVariable("DDVAM_vfModules")
374 def vfModule = vfModules[i]
376 def vfModuleId = vfModule.get("vfModuleId")
377 execution.setVariable("DDVAM_vfModuleId", vfModuleId)
379 def vfModuleName = vfModule.get("vfModuleName")
380 execution.setVariable("DDVAM_vfModuleName", vfModuleName)
382 def vfModuleModelInfo = vfModule.get("vfModuleModelInfo")
383 msoLogger.debug("vfModuleModelInfo for module delete: " + vfModuleModelInfo)
384 execution.setVariable("DDVAM_vfModuleModelInfo", vfModuleModelInfo)
387 msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing preProcessAddOnModule." + e, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
388 exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during prepareNextModuleToDelete Method:\n" + e.getMessage())
390 msoLogger.trace("COMPLETED prepareNextModuleToDelete ")
393 public void preProcessSDNCDeactivateRequest(DelegateExecution execution){
395 execution.setVariable("prefix", Prefix)
396 msoLogger.trace("STARTED preProcessSDNCDeactivateRequest ")
397 def vnfId = execution.getVariable("vnfId")
398 def serviceInstanceId = execution.getVariable("serviceInstanceId")
403 String deactivateSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "deactivate")
405 deactivateSDNCRequest = utils.formatXml(deactivateSDNCRequest)
406 execution.setVariable("DDVAM_deactivateSDNCRequest", deactivateSDNCRequest)
407 msoLogger.debug("Outgoing DeactivateSDNCRequest is: \n" + deactivateSDNCRequest)
408 msoLogger.debug("Outgoing DeactivateSDNCRequest is: \n" + deactivateSDNCRequest)
411 msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing preProcessSDNCDeactivateRequest." + e, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
412 exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessSDNCDeactivateRequest Method:\n" + e.getMessage())
414 msoLogger.trace("COMPLETED preProcessSDNCDeactivateRequest ")
417 public void preProcessSDNCUnassignRequest(DelegateExecution execution) {
418 def method = getClass().getSimpleName() + '.preProcessSDNCUnassignRequest(' +
419 'execution=' + execution.getId() +
422 msoLogger.trace('Entered ' + method)
423 execution.setVariable("prefix", Prefix)
424 msoLogger.trace("STARTED preProcessSDNCUnassignRequest Process ")
426 String vnfId = execution.getVariable("vnfId")
427 String serviceInstanceId = execution.getVariable("serviceInstanceId")
429 String unassignSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "unassign")
431 execution.setVariable("DDVAM_unassignSDNCRequest", unassignSDNCRequest)
432 msoLogger.debug("Outgoing UnassignSDNCRequest is: \n" + unassignSDNCRequest)
433 msoLogger.debug("Outgoing UnassignSDNCRequest is: \n" + unassignSDNCRequest)
436 msoLogger.debug("Exception Occured Processing preProcessSDNCUnassignRequest. Exception is:\n" + e)
437 exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessSDNCUnassignRequest Method:\n" + e.getMessage())
439 msoLogger.trace("COMPLETED preProcessSDNCUnassignRequest Process ")
442 public String buildSDNCRequest(DelegateExecution execution, String svcInstId, String action){
444 String uuid = execution.getVariable('testReqId') // for junits
446 uuid = execution.getVariable("msoRequestId") + "-" + System.currentTimeMillis()
448 def callbackURL = execution.getVariable("sdncCallbackUrl")
449 def requestId = execution.getVariable("msoRequestId")
450 def serviceId = execution.getVariable("DDVAM_serviceId")
451 def tenantId = execution.getVariable("DDVAM_tenantId")
452 def source = execution.getVariable("DDVAM_source")
453 def vnfId = execution.getVariable("vnfId")
454 def serviceInstanceId = execution.getVariable("serviceInstanceId")
455 def cloudSiteId = execution.getVariable("DDVAM_cloudSiteId")
456 def modelCustomizationId = execution.getVariable("DDVAM_modelCustomizationId")
457 //def serviceModelInfo = execution.getVariable("serviceModelInfo")
458 //def vnfModelInfo = execution.getVariable("vnfModelInfo")
459 //String serviceEcompModelInformation = sdncAdapterUtils.modelInfoToEcompModelInformation(serviceModelInfo)
460 //String vnfEcompModelInformation = sdncAdapterUtils.modelInfoToEcompModelInformation(vnfModelInfo)
461 def globalSubscriberId = execution.getVariable("DDVAM_globalSubscriberId")
462 def sdncVersion = execution.getVariable("DDVAM_sdncVersion")
465 """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
466 xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
467 xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
468 <sdncadapter:RequestHeader>
469 <sdncadapter:RequestId>${MsoUtils.xmlEscape(uuid)}</sdncadapter:RequestId>
470 <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(svcInstId)}</sdncadapter:SvcInstanceId>
471 <sdncadapter:SvcAction>${MsoUtils.xmlEscape(action)}</sdncadapter:SvcAction>
472 <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
473 <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackURL)}</sdncadapter:CallbackUrl>
474 <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
475 </sdncadapter:RequestHeader>
476 <sdncadapterworkflow:SDNCRequestData>
477 <request-information>
478 <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
479 <request-action>DeleteVnfInstance</request-action>
480 <source>${MsoUtils.xmlEscape(source)}</source>
484 </request-information>
485 <service-information>
487 <subscription-service-type/>
488 <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
489 <global-customer-id/>
490 </service-information>
492 <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
497 <tenant>${MsoUtils.xmlEscape(tenantId)}</tenant>
498 <aic-cloud-region>${MsoUtils.xmlEscape(cloudSiteId)}</aic-cloud-region>
500 </sdncadapterworkflow:SDNCRequestData>
501 </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
503 msoLogger.debug("sdncRequest: " + sdncRequest)
507 public void validateSDNCResponse(DelegateExecution execution, String response, String method){
509 execution.setVariable("prefix",Prefix)
510 msoLogger.trace("STARTED ValidateSDNCResponse Process")
512 WorkflowException workflowException = execution.getVariable("WorkflowException")
513 boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
515 msoLogger.debug("workflowException: " + workflowException)
517 SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
518 sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
520 msoLogger.debug("SDNCResponse: " + response)
522 String sdncResponse = response
523 if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
524 msoLogger.debug("Received a Good Response from SDNC Adapter for " + method + " SDNC Call. Response is: \n" + sdncResponse)
526 msoLogger.debug("Received a BAD Response from SDNC Adapter for " + method + " SDNC Call.")
527 throw new BpmnError("MSOWorkflowException")
529 msoLogger.trace("COMPLETED ValidateSDNCResponse Process")