2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2018 Huawei Technologies Co., Ltd. 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.openecomp.mso.bpmn.infrastructure.scripts;
23 import static org.apache.commons.lang3.StringUtils.*;
24 import groovy.xml.XmlUtil
26 import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
27 import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
29 import org.openecomp.mso.bpmn.core.WorkflowException
30 import org.openecomp.mso.bpmn.core.json.JsonUtils
31 import org.openecomp.mso.bpmn.core.domain.Resource
32 import org.openecomp.mso.rest.APIResponse
34 import java.util.List;
35 import java.util.UUID;
37 import org.camunda.bpm.engine.delegate.BpmnError
38 import org.camunda.bpm.engine.delegate.DelegateExecution
39 import org.json.JSONObject
40 import org.json.JSONArray
41 import org.apache.commons.lang3.*
42 import org.apache.commons.codec.binary.Base64;
43 import org.springframework.web.util.UriUtils
46 * This groovy class supports the <class>UpdateCustomE2EServiceInstance.bpmn</class> process.
47 * AlaCarte flow for 1702 ServiceInstance Update
50 public class UpdateCustomE2EServiceInstance extends AbstractServiceTaskProcessor {
51 String Prefix="UPDSI_"
52 ExceptionUtil exceptionUtil = new ExceptionUtil()
53 JsonUtils jsonUtil = new JsonUtils()
56 public void preProcessRequest (DelegateExecution execution) {
57 def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
58 execution.setVariable("prefix",Prefix)
60 utils.log("INFO", " *** preProcessRequest() *** ", isDebugEnabled)
64 String siRequest = execution.getVariable("bpmnRequest")
65 utils.logAudit(siRequest)
67 String requestId = execution.getVariable("mso-request-id")
68 execution.setVariable("msoRequestId", requestId)
69 utils.log("INFO", "Input Request:" + siRequest + " reqId:" + requestId, isDebugEnabled)
71 String serviceInstanceId = execution.getVariable("serviceInstanceId")
72 if (isBlank(serviceInstanceId)) {
73 msg = "Input serviceInstanceId' is null"
74 exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
77 //subscriberInfo for aai
78 String globalSubscriberId = jsonUtil.getJsonValue(siRequest, "requestDetails.subscriberInfo.globalSubscriberId")
79 if (isBlank(globalSubscriberId)) {
80 msg = "Input globalSubscriberId' is null"
81 exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
83 execution.setVariable("globalSubscriberId", globalSubscriberId)
87 execution.setVariable("source", jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.source"))
88 execution.setVariable("serviceInstanceName", jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.instanceName"))
89 execution.setVariable("disableRollback", jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.suppressRollback"))
90 String productFamilyId = jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.productFamilyId")
91 if (isBlank(productFamilyId))
93 msg = "Input productFamilyId is null"
94 utils.log("INFO", msg, isDebugEnabled)
96 execution.setVariable("productFamilyId", productFamilyId)
100 String userParams = jsonUtil.getJsonValue(siRequest, "requestDetails.requestParameters.userParams")
101 utils.log("INFO", "userParams:" + userParams, isDebugEnabled)
102 List<String> paramList = jsonUtil.StringArrayToList(execution, userParams)
103 String uuiRequest = jsonUtil.getJsonValue(paramList.get(0), "UUIRequest")
104 if (isBlank(uuiRequest)) {
105 msg = "Input uuiRequest is null"
106 utils.log("INFO", msg, isDebugEnabled)
107 exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
110 execution.setVariable("uuiRequest", uuiRequest)
113 utils.log("INFO", "uuiRequest:\n" + uuiRequest, isDebugEnabled)
115 //serviceType for aai
116 String serviceType = jsonUtil.getJsonValue(uuiRequest, "service.serviceType")
117 if (isBlank(serviceType)) {
118 msg = "Input serviceType is null"
119 utils.log("INFO", msg, isDebugEnabled)
120 exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
122 execution.setVariable("serviceType", serviceType)
126 String modelInvariantUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceInvariantUuid")
127 utils.log("INFO","modelInvariantUuid: " + modelInvariantUuid, isDebugEnabled)
128 execution.setVariable("modelInvariantUuid", modelInvariantUuid)
129 execution.setVariable("model-invariant-id-target", modelInvariantUuid)
131 String modelUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceUuid")
132 utils.log("INFO","modelUuid: " + modelUuid, isDebugEnabled)
133 execution.setVariable("modelUuid", modelUuid)
134 execution.setVariable("model-version-id-target", modelUuid)
136 String serviceModelName = jsonUtil.getJsonValue(uuiRequest, "service.parameters.templateName")
137 utils.log("INFO","serviceModelName: " + serviceModelName, isDebugEnabled)
138 if(serviceModelName == null) {
139 serviceModelName = ""
141 execution.setVariable("serviceModelName", serviceModelName)
144 String operationId = jsonUtil.getJsonValue(siRequest, "operationId")
145 if (isBlank(operationId)) {
146 operationId = UUID.randomUUID().toString()
148 execution.setVariable("operationId", operationId)
149 execution.setVariable("operationType", "update")
150 execution.setVariable("hasResourcetoUpdate", false)
152 execution.setVariable("URN_mso_adapters_openecomp_db_endpoint","http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter")
154 } catch (BpmnError e) {
156 } catch (Exception ex){
157 msg = "Exception in preProcessRequest " + ex.getMessage()
158 utils.log("INFO", msg, isDebugEnabled)
159 exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
161 utils.log("INFO"," ***** Exit preProcessRequest *****", isDebugEnabled)
165 public void postProcessAAIGET(DelegateExecution execution) {
166 def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
167 utils.log("INFO"," ***** postProcessAAIGET ***** ", isDebugEnabled)
171 String serviceInstanceId = execution.getVariable("serviceInstanceId")
172 boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
173 String serviceType = ""
176 utils.log("INFO","Found Service-instance in AAI", isDebugEnabled)
178 String siData = execution.getVariable("GENGS_service")
179 utils.log("INFO", "SI Data", isDebugEnabled)
182 msg = "Could not retrive ServiceInstance data from AAI, Id:" + serviceInstanceId
183 utils.log("INFO", msg, isDebugEnabled)
184 exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
187 utils.log("INFO", "SI Data" + siData, isDebugEnabled)
189 // serviceInstanceName
190 String serviceInstanceName = execution.getVariable("serviceInstanceName")
191 if(isBlank(serviceInstanceName) && utils.nodeExists(siData, "service-instance-name")) {
192 serviceInstanceName = utils.getNodeText1(siData, "service-instance-name")
193 execution.setVariable("serviceInstanceName", serviceInstanceName)
196 // Get Template uuid and version
197 if (utils.nodeExists(siData, "model-invariant-id") && utils.nodeExists(siData, "model-version-id") ) {
198 utils.log("INFO", "SI Data model-invariant-id and model-version-id exist:", isDebugEnabled)
200 def modelInvariantId = utils.getNodeText1(siData, "model-invariant-id")
201 def modelVersionId = utils.getNodeText1(siData, "model-version-id")
203 // Set Original Template info
204 execution.setVariable("model-invariant-id-original", modelInvariantId)
205 execution.setVariable("model-version-id-original", modelVersionId)
208 //get related service instances (vnf/network or volume) for delete
209 if (utils.nodeExists(siData, "relationship-list")) {
210 utils.log("INFO", "SI Data relationship-list exists:", isDebugEnabled)
212 JSONArray jArray = new JSONArray()
214 XmlParser xmlParser = new XmlParser()
215 Node root = xmlParser.parseText(siData)
216 def relation_list = utils.getChildNode(root, 'relationship-list')
217 def relationships = utils.getIdenticalChildren(relation_list, 'relationship')
219 for (def relation: relationships) {
220 def jObj = getRelationShipData(relation, isDebugEnabled)
224 execution.setVariable("serviceRelationShip", jArray.toString())
227 boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
229 utils.log("INFO","Error getting Service-instance from AAI", + serviceInstanceId, isDebugEnabled)
230 WorkflowException workflowException = execution.getVariable("WorkflowException")
231 utils.logAudit("workflowException: " + workflowException)
232 if(workflowException != null){
233 exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
237 msg = "Failure in postProcessAAIGET GENGS_SuccessIndicator:" + succInAAI
238 utils.log("INFO", msg, isDebugEnabled)
239 exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
243 utils.log("INFO","Service-instance NOT found in AAI. Silent Success", isDebugEnabled)
245 }catch (BpmnError e) {
247 } catch (Exception ex) {
248 msg = "Exception in DoDeleteE2EServiceInstance.postProcessAAIGET. " + ex.getMessage()
249 utils.log("INFO", msg, isDebugEnabled)
250 exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
252 utils.log("INFO"," *** Exit postProcessAAIGET *** ", isDebugEnabled)
255 private JSONObject getRelationShipData(node, isDebugEnabled){
256 JSONObject jObj = new JSONObject()
258 def relation = utils.nodeToString(node)
259 def rt = utils.getNodeText1(relation, "related-to")
261 def rl = utils.getNodeText1(relation, "related-link")
262 utils.log("INFO", "ServiceInstance Related NS/Configuration :" + rl, isDebugEnabled)
264 def rl_datas = utils.getIdenticalChildren(node, "relationship-data")
265 for(def rl_data : rl_datas) {
266 def eKey = utils.getChildNodeText(rl_data, "relationship-key")
267 def eValue = utils.getChildNodeText(rl_data, "relationship-value")
269 if ((rt == "service-instance" && eKey.equals("service-instance.service-instance-id"))
270 //for overlay/underlay
271 || (rt == "configuration" && eKey.equals("configuration.configuration-id"))){
272 jObj.put("resourceInstanceId", eValue)
276 def rl_props = utils.getIdenticalChildren(node, "related-to-property")
277 for(def rl_prop : rl_props) {
278 def eKey = utils.getChildNodeText(rl_prop, "property-key")
279 def eValue = utils.getChildNodeText(rl_prop, "property-value")
280 if((rt == "service-instance" && eKey.equals("service-instance.service-instance-name"))
281 //for overlay/underlay
282 || (rt == "configuration" && eKey.equals("configuration.configuration-type"))){
283 jObj.put("resourceType", eValue)
287 utils.log("INFO", "Relationship related to Resource:" + jObj.toString(), isDebugEnabled)
293 public void preCompareModelVersions(DelegateExecution execution) {
294 def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
297 public void postCompareModelVersions(DelegateExecution execution) {
298 def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
299 utils.log("DEBUG", " ======== STARTED postCompareModelVersions Process ======== ", isDebugEnabled)
301 def hasResourcetoUpdate = false
302 def hasResourcetoAdd = false
303 def hasResourcetoDelete = false
304 List<Resource> addResourceList = execution.getVariable("addResourceList")
305 List<Resource> delResourceList = execution.getVariable("delResourceList")
307 if(addResourceList != null && !addResourceList.isEmpty()) {
308 hasResourcetoAdd = true
311 if(delResourceList != null && !delResourceList.isEmpty()) {
312 hasResourcetoDelete = true
315 hasResourcetoUpdate = hasResourcetoAdd || hasResourcetoDelete
316 execution.setVariable("hasResourcetoUpdate", hasResourcetoUpdate)
318 utils.log("DEBUG", "======== COMPLETED postCompareModelVersions Process ======== ", isDebugEnabled)
322 * Init the service Operation Status
324 public void prepareInitServiceOperationStatus(DelegateExecution execution){
325 def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
326 utils.log("DEBUG", " ======== STARTED prepareInitServiceOperationStatus Process ======== ", isDebugEnabled)
328 String serviceId = execution.getVariable("serviceInstanceId")
329 String operationId = execution.getVariable("operationId")
330 String operationType = execution.getVariable("operationType")
332 String result = "processing"
333 String progress = "0"
335 String operationContent = "Prepare service updating"
336 utils.log("DEBUG", "Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId, isDebugEnabled)
337 serviceId = UriUtils.encode(serviceId,"UTF-8")
338 execution.setVariable("serviceInstanceId", serviceId)
339 execution.setVariable("operationId", operationId)
340 execution.setVariable("operationType", operationType)
342 def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint")
343 execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
344 utils.log("DEBUG", "DB Adapter Endpoint is: " + dbAdapterEndpoint, isDebugEnabled)
347 """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
348 xmlns:ns="http://org.openecomp.mso/requestsdb">
351 <ns:updateServiceOperationStatus xmlns:ns="http://org.openecomp.mso/requestsdb">
352 <serviceId>${serviceId}</serviceId>
353 <operationId>${operationId}</operationId>
354 <operationType>${operationType}</operationType>
355 <userId>${userId}</userId>
356 <result>${result}</result>
357 <operationContent>${operationContent}</operationContent>
358 <progress>${progress}</progress>
359 <reason>${reason}</reason>
360 </ns:updateServiceOperationStatus>
362 </soapenv:Envelope>"""
364 payload = utils.formatXml(payload)
365 execution.setVariable("CVFMI_updateServiceOperStatusRequest", payload)
366 utils.log("DEBUG", "Outgoing updateServiceOperStatusRequest: \n" + payload, isDebugEnabled)
367 utils.logAudit("CreateVfModuleInfra Outgoing updateServiceOperStatusRequest Request: " + payload)
370 utils.log("ERROR", "Exception Occured Processing prepareInitServiceOperationStatus. Exception is:\n" + e, isDebugEnabled)
371 execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during prepareInitServiceOperationStatus Method:\n" + e.getMessage())
373 utils.log("DEBUG", "======== COMPLETED prepareInitServiceOperationStatus Process ======== ", isDebugEnabled)
377 * Update the service Operation Status
379 public void preUpdateServiceOperationStatus(DelegateExecution execution){
380 def method = getClass().getSimpleName() + '.preUpdateServiceOperationStatus(' +'execution=' + execution.getId() +')'
381 def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
382 utils.log("INFO","Entered " + method, isDebugEnabled)
385 String serviceId = execution.getVariable("serviceInstanceId")
386 String operationId = execution.getVariable("operationId")
387 String operationType = execution.getVariable("operationType")
388 String serviceName = execution.getVariable("serviceInstanceName")
389 String result = execution.getVariable("operationResult")
390 String progress = execution.getVariable("progress")
391 String reason = execution.getVariable("operationReason")
393 utils.log("INFO", "progress: " + progress , isDebugEnabled)
395 String operationContent = "Prepare service : " + execution.getVariable("operationStatus")
397 utils.log("INFO", "Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId, isDebugEnabled)
398 serviceId = UriUtils.encode(serviceId,"UTF-8")
399 execution.setVariable("serviceInstanceId", serviceId)
400 execution.setVariable("operationId", operationId)
401 execution.setVariable("operationType", operationType)
403 def dbAdapterEndpoint = "http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter"
404 execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
405 utils.log("INFO", "DB Adapter Endpoint is: " + dbAdapterEndpoint, isDebugEnabled)
407 execution.setVariable("URN_mso_openecomp_adapters_db_endpoint","http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter")
409 """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
410 xmlns:ns="http://org.openecomp.mso/requestsdb">
413 <ns:updateServiceOperationStatus xmlns:ns="http://org.openecomp.mso/requestsdb">
414 <serviceId>${serviceId}</serviceId>
415 <operationId>${operationId}</operationId>
416 <operationType>${operationType}</operationType>
417 <userId>${userId}</userId>
418 <result>${result}</result>
419 <operationContent>${operationContent}</operationContent>
420 <progress>${progress}</progress>
421 <reason>${reason}</reason>
422 </ns:updateServiceOperationStatus>
424 </soapenv:Envelope>"""
426 payload = utils.formatXml(payload)
427 execution.setVariable("CVFMI_updateServiceOperStatusRequest", payload)
428 utils.log("INFO", "Outgoing preUpdateServiceOperationStatus: \n" + payload, isDebugEnabled)
432 utils.log("ERROR", "Exception Occured Processing preUpdateServiceOperationStatus. Exception is:\n" + e, isDebugEnabled)
433 execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during preUpdateServiceOperationStatus Method:\n" + e.getMessage())
435 utils.log("INFO", "======== COMPLETED preUpdateServiceOperationStatus Process ======== ", isDebugEnabled)
436 utils.log("INFO", "Exited " + method, isDebugEnabled)
439 public void sendSyncResponse (DelegateExecution execution) {
440 def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
441 utils.log("INFO", " *** sendSyncResponse *** ", isDebugEnabled)
444 String operationId = execution.getVariable("operationId")
445 def hasResourcetoUpdate = execution.getVariable("hasResourcetoUpdate")
447 String updateServiceResp = ""
448 if(hasResourcetoUpdate) {
449 // RESTResponse for API Handler (APIH) Reply Task
450 updateServiceResp = """{"operationId":"${operationId}"}""".trim()
453 updateServiceResp = """{"OperationResult":"No Resource to Add or Delete or Service Instance not found in AAI."}"""
456 utils.log("INFO", " sendSyncResponse to APIH:" + "\n" + updateServiceResp, isDebugEnabled)
457 sendWorkflowResponse(execution, 202, updateServiceResp)
458 execution.setVariable("sentSyncResponse", true)
460 } catch (Exception ex) {
461 String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage()
462 utils.log("INFO", msg, isDebugEnabled)
463 exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
465 utils.log("INFO"," ***** Exit sendSyncResopnse *****", isDebugEnabled)
468 public void sendSyncError (DelegateExecution execution) {
469 def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
470 utils.log("INFO", " *** sendSyncError *** ", isDebugEnabled)
473 String errorMessage = ""
475 if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
476 WorkflowException wfe = execution.getVariable("WorkflowException")
477 errorMessage = wfe.getErrorMessage()
478 errorCode = wfe.getErrorCode()
480 errorMessage = "Sending Sync Error."
483 String buildworkflowException =
484 """<aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
\r
485 <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
486 <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
487 </aetgt:WorkflowException>"""
489 utils.logAudit(buildworkflowException)
490 sendWorkflowResponse(execution, 500, buildworkflowException)
492 } catch (Exception ex) {
493 utils.log("INFO", " Sending Sync Error Activity Failed. " + "\n" + ex.getMessage(), isDebugEnabled)
498 public void prepareCompletionRequest (DelegateExecution execution) {
499 def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
500 utils.log("INFO", " *** prepareCompletion *** ", isDebugEnabled)
503 String requestId = execution.getVariable("msoRequestId")
504 String serviceInstanceId = execution.getVariable("serviceInstanceId")
505 String source = execution.getVariable("source")
507 String msoCompletionRequest =
508 """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
\r
509 xmlns:ns="http://org.openecomp/mso/request/types/v1">
\r
510 <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
\r
511 <request-id>${requestId}</request-id>
512 <action>UPDATE</action>
513 <source>${source}</source>
515 <status-message>Service Instance was updated successfully.</status-message>
516 <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
517 <mso-bpel-name>UpdateCustomE2EServiceInstance</mso-bpel-name>
518 </aetgt:MsoCompletionRequest>"""
521 String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
523 execution.setVariable("completionRequest", xmlMsoCompletionRequest)
524 utils.log("INFO", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
526 } catch (Exception ex) {
527 String msg = " Exception in prepareCompletion:" + ex.getMessage()
528 utils.log("INFO", msg, isDebugEnabled)
529 exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
531 utils.log("INFO", "*** Exit prepareCompletionRequest ***", isDebugEnabled)
534 public void prepareFalloutRequest(DelegateExecution execution){
535 def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
536 utils.log("INFO", " *** prepareFalloutRequest *** ", isDebugEnabled)
539 WorkflowException wfex = execution.getVariable("WorkflowException")
540 utils.log("INFO", " Input Workflow Exception: " + wfex.toString(), isDebugEnabled)
541 String requestId = execution.getVariable("msoRequestId")
542 String source = execution.getVariable("source")
544 """<request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
\r
545 <request-id>${requestId}</request-id>
546 <action>UPDATE</action>
547 <source>${source}</source>
550 String falloutRequest = exceptionUtil.processMainflowsBPMNException(execution, requestInfo)
551 execution.setVariable("falloutRequest", falloutRequest)
552 } catch (Exception ex) {
553 utils.log("INFO", "Exception prepareFalloutRequest:" + ex.getMessage(), isDebugEnabled)
554 String errorException = " Bpmn error encountered in UpdateCustomE2EServiceInstance flow. FalloutHandlerRequest, buildErrorResponse() - " + ex.getMessage()
555 String requestId = execution.getVariable("msoRequestId")
556 String falloutRequest =
557 """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
\r
558 xmlns:ns="http://org.openecomp/mso/request/types/v1"
\r
559 xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
\r
560 <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
\r
561 <request-id>${requestId}</request-id>
562 <action>UPDATE</action>
565 <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
\r
566 <aetgt:ErrorMessage>${errorException}</aetgt:ErrorMessage>
567 <aetgt:ErrorCode>7000</aetgt:ErrorCode>
568 </aetgt:WorkflowException>
569 </aetgt:FalloutHandlerRequest>"""
571 execution.setVariable("falloutRequest", falloutRequest)
573 utils.log("INFO", "*** Exit prepareFalloutRequest ***", isDebugEnabled)