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.vcpe.scripts
23 import org.camunda.bpm.engine.delegate.BpmnError
24 import org.camunda.bpm.engine.delegate.DelegateExecution
25 import org.onap.aai.domain.yang.AllottedResource
26 import org.onap.so.bpmn.common.scripts.*;
27 import org.onap.so.bpmn.core.RollbackData
28 import org.onap.so.bpmn.core.UrnPropertiesReader
29 import org.onap.so.bpmn.core.WorkflowException
30 import org.onap.so.bpmn.core.json.JsonUtils
31 import org.onap.so.client.aai.AAIObjectType
32 import org.onap.so.client.aai.entities.uri.AAIResourceUri
33 import org.onap.so.client.aai.entities.uri.AAIUriFactory
34 import org.onap.so.logger.MessageEnum
35 import org.onap.so.logger.MsoLogger
37 import javax.ws.rs.core.UriBuilder
38 import static org.apache.commons.lang3.StringUtils.isBlank
41 * This groovy class supports the <class>DoCreateAllottedResourceTXC.bpmn</class> process.
46 * @param - msoRequestId
47 * @param - isDEbugLogEnabled
48 * @param - disableRollback
49 * @param - failExists - O
50 * @param - serviceInstanceId
51 * @param - globalCustomerId - O
52 * @param - subscriptionServiceType - O
53 * @param - parentServiceInstanceId
54 * @param - allottedReourceId - O
55 * @param - allottedResourceModelInfo
56 * @param - allottedResourceRole
57 * @param - allottedResourceType
58 * @param - brgWanMacAddress
61 * @param - rollbackData (localRB->null)
62 * @param - rolledBack (no localRB->null, localRB F->false, localRB S->true)
63 * @param - WorkflowException - O
64 * @param - allottedResourceId
65 * @param - allottedResourceName
67 * @param - vgmuxBearerIP
71 public class DoCreateAllottedResourceTXC extends AbstractServiceTaskProcessor{
72 private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoCreateAllottedResourceTXC.class);
74 String Prefix="DCARTXC_"
75 ExceptionUtil exceptionUtil = new ExceptionUtil()
76 JsonUtils jsonUtil = new JsonUtils()
78 public void preProcessRequest (DelegateExecution execution) {
82 msoLogger.trace("start preProcessRequest")
85 String msoRequestId = execution.getVariable("msoRequestId")
86 msoLogger.debug(" msoRequestId = " + msoRequestId)
88 execution.setVariable("prefix", Prefix)
91 String sdncCallbackUrl = UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
92 if (isBlank(sdncCallbackUrl)) {
93 msg = "mso.workflow.sdncadapter.callback is null"
95 exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
97 execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
98 msoLogger.debug("SDNC Callback URL: " + sdncCallbackUrl)
100 String sdncReplDelay = UrnPropertiesReader.getVariable("mso.workflow.sdnc.replication.delay",execution)
101 if (isBlank(sdncReplDelay)) {
102 msg = "mso.workflow.sdnc.replication.delay is null"
104 exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
106 execution.setVariable("sdncReplDelay", sdncReplDelay)
107 msoLogger.debug("SDNC replication delay: " + sdncReplDelay)
110 if (isBlank(execution.getVariable("serviceInstanceId"))){
111 msg = "Input serviceInstanceId is null"
113 exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
115 if (isBlank(execution.getVariable("parentServiceInstanceId"))) {
116 msg = "Input parentServiceInstanceId is null"
118 exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
120 if (isBlank(execution.getVariable("allottedResourceModelInfo"))) {
121 msg = "Input allottedResourceModelInfo is null"
123 exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
125 if (isBlank(execution.getVariable("brgWanMacAddress"))) {
126 msg = "Input brgWanMacAddress is null"
128 exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
130 if (isBlank(execution.getVariable("allottedResourceRole"))) {
131 msg = "Input allottedResourceRole is null"
133 exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
135 if (isBlank(execution.getVariable("allottedResourceType"))) {
136 msg = "Input allottedResourceType is null"
138 exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
141 msoLogger.debug("Rethrowing MSOWorkflowException")
143 } catch (Exception ex){
144 msg = "Exception in preProcessRequest " + ex.getMessage()
146 exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
148 msoLogger.trace("end preProcessRequest")
151 public void getAaiAR (DelegateExecution execution) {
154 msoLogger.trace("start getAaiAR")
156 String arType = execution.getVariable("allottedResourceType")
157 String arRole = execution.getVariable("allottedResourceRole")
159 AllottedResourceUtils arUtils = new AllottedResourceUtils(this)
160 String orchStatus = arUtils.getAROrchStatus(execution)
164 if (orchStatus != null) // AR was found
166 if ("true".equals(execution.getVariable("failExists")))
168 errorMsg = "Allotted resource " + arType + " with Role " + arRole + " already exists"
172 if ("Active".equals(orchStatus))
174 execution.setVariable("foundActiveAR", true)
176 else // blanks included
178 errorMsg = "Allotted Resource " + arType + " with Role " + arRole + " already exists in an incomplete state -" + orchStatus
182 if (!isBlank(errorMsg)) {
183 msoLogger.debug(errorMsg)
184 exceptionUtil.buildAndThrowWorkflowException(execution, 500, errorMsg)
186 msoLogger.trace("end getAaiAR")
189 public void createAaiAR(DelegateExecution execution) {
192 msoLogger.trace("start createAaiAR")
194 String allottedResourceId = execution.getVariable("allottedResourceId")
195 if (isBlank(allottedResourceId))
197 allottedResourceId = UUID.randomUUID().toString()
198 execution.setVariable("allottedResourceId", allottedResourceId)
202 AAIResourceUri siResourceLink= execution.getVariable("PSI_resourceLink")
204 AAIResourceUri allottedResourceUri = AAIUriFactory.createResourceFromParentURI(siResourceLink, AAIObjectType.ALLOTTED_RESOURCE, allottedResourceId)
206 execution.setVariable("aaiARPath", allottedResourceUri.build().toString());
207 String arType = execution.getVariable("allottedResourceType")
208 String arRole = execution.getVariable("allottedResourceRole")
209 String CSI_resourceLink = execution.getVariable("CSI_resourceLink")
210 String arModelInfo = execution.getVariable("allottedResourceModelInfo")
211 msoLogger.debug("arModelInfo is:\n" + arModelInfo)
212 String modelInvariantId = jsonUtil.getJsonValue(arModelInfo, "modelInvariantUuid")
213 String modelVersionId = jsonUtil.getJsonValue(arModelInfo, "modelUuid")
215 AllottedResource resource = new AllottedResource()
216 resource.setId(allottedResourceId)
217 resource.setType(arType)
218 resource.setRole(arRole)
219 resource.setModelInvariantId(modelInvariantId)
220 resource.setModelVersionId(modelVersionId)
221 getAAIClient().create(allottedResourceUri, resource)
222 AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceFromExistingURI(AAIObjectType.SERVICE_INSTANCE, UriBuilder.fromPath(CSI_resourceLink).build())
223 getAAIClient().connect(allottedResourceUri,serviceInstanceUri)
225 }catch (Exception ex) {
226 exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Exception in createAaiAR " + ex.getMessage())
229 //start rollback set up
230 RollbackData rollbackData = new RollbackData()
231 def disableRollback = execution.getVariable("disableRollback")
232 rollbackData.put(Prefix, "disableRollback", disableRollback.toString())
233 rollbackData.put(Prefix, "rollbackAAI", "true")
234 rollbackData.put(Prefix, "allottedResourceId", allottedResourceId)
235 rollbackData.put(Prefix, "serviceInstanceId", execution.getVariable("serviceInstanceId"))
236 rollbackData.put(Prefix, "parentServiceInstanceId", execution.getVariable("parentServiceInstanceId"))
237 execution.setVariable("rollbackData", rollbackData)
238 msoLogger.trace("end createAaiAR")
241 public String buildSDNCRequest(DelegateExecution execution, String action, String sdncRequestId) {
245 msoLogger.trace("start buildSDNCRequest")
246 String sdncReq = null
250 String allottedResourceId = execution.getVariable("allottedResourceId")
251 String serviceInstanceId = execution.getVariable("serviceInstanceId")
252 String globalCustomerId = execution.getVariable("globalCustomerId")
253 String subscriptionServiceType = execution.getVariable("subscriptionServiceType")
254 String parentServiceInstanceId = execution.getVariable("parentServiceInstanceId")
255 String serviceChainServiceInstanceId = execution.getVariable("serviceChainServiceInstanceId")
256 String callbackUrl = execution.getVariable("sdncCallbackUrl")
257 String requestId = execution.getVariable("msoRequestId")
259 String brgWanMacAddress = execution.getVariable("brgWanMacAddress")
261 String arModelInfo = execution.getVariable("allottedResourceModelInfo")
262 String modelInvariantId = jsonUtil.getJsonValue(arModelInfo, "modelInvariantUuid")
263 String modelVersion = jsonUtil.getJsonValue(arModelInfo, "modelVersion")
264 String modelUUId = jsonUtil.getJsonValue(arModelInfo, "modelUuid")
265 String modelCustomizationId = jsonUtil.getJsonValue(arModelInfo, "modelCustomizationUuid")
266 String modelName = jsonUtil.getJsonValue(arModelInfo, "modelName")
268 if (modelInvariantId == null) {
269 modelInvariantId = ""
271 if (modelVersion == null) {
274 if (modelUUId == null) {
277 if (modelName == null) {
280 if (modelCustomizationId == null) {
281 modelCustomizationId = ""
285 """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
286 xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
287 xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
288 <sdncadapter:RequestHeader>
289 <sdncadapter:RequestId>${MsoUtils.xmlEscape(sdncRequestId)}</sdncadapter:RequestId>
290 <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
291 <sdncadapter:SvcAction>${MsoUtils.xmlEscape(action)}</sdncadapter:SvcAction>
292 <sdncadapter:SvcOperation>tunnelxconn-topology-operation</sdncadapter:SvcOperation>
293 <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackUrl)}</sdncadapter:CallbackUrl>
294 </sdncadapter:RequestHeader>
295 <sdncadapterworkflow:SDNCRequestData>
296 <request-information>
297 <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
298 <request-action>CreateTunnelXConnInstance</request-action>
303 </request-information>
304 <service-information>
305 <service-id></service-id>
306 <subscription-service-type>${MsoUtils.xmlEscape(subscriptionServiceType)}</subscription-service-type>
307 <onap-model-information></onap-model-information>
308 <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
310 <global-customer-id>${MsoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
311 </service-information>
312 <allotted-resource-information>
313 <allotted-resource-id>${MsoUtils.xmlEscape(allottedResourceId)}</allotted-resource-id>
314 <allotted-resource-type>tunnelxconn</allotted-resource-type>
315 <parent-service-instance-id>${MsoUtils.xmlEscape(parentServiceInstanceId)}</parent-service-instance-id>
316 <onap-model-information>
317 <model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantId)}</model-invariant-uuid>
318 <model-uuid>${MsoUtils.xmlEscape(modelUUId)}</model-uuid>
319 <model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationId)}</model-customization-uuid>
320 <model-version>${MsoUtils.xmlEscape(modelVersion)}</model-version>
321 <model-name>${MsoUtils.xmlEscape(modelName)}</model-name>
322 </onap-model-information>
323 </allotted-resource-information>
324 <tunnelxconn-request-input>
325 <brg-wan-mac-address>${MsoUtils.xmlEscape(brgWanMacAddress)}</brg-wan-mac-address>
326 </tunnelxconn-request-input>
327 </sdncadapterworkflow:SDNCRequestData>
328 </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
330 msoLogger.debug("sdncRequest:\n" + sdncReq)
331 sdncReq = utils.formatXml(sdncReq)
333 } catch(Exception ex) {
334 msg = "Exception in buildSDNCRequest. " + ex.getMessage()
336 exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
338 msoLogger.trace("end buildSDNCRequest")
342 public void preProcessSDNCAssign(DelegateExecution execution) {
346 msoLogger.trace("start preProcessSDNCAssign")
349 String sdncRequestId = UUID.randomUUID().toString()
350 String sdncAssignReq = buildSDNCRequest(execution, "assign", sdncRequestId)
351 execution.setVariable("sdncAssignRequest", sdncAssignReq)
352 msoLogger.debug("sdncAssignRequest: " + sdncAssignReq)
353 def sdncRequestId2 = UUID.randomUUID().toString()
354 String sdncAssignRollbackReq = sdncAssignReq.replace(">assign<", ">unassign<").replace(">CreateTunnelXConnInstance<", ">DeleteTunnelXConnInstance<").replace(">${sdncRequestId}<", ">${sdncRequestId2}<")
355 def rollbackData = execution.getVariable("rollbackData")
356 rollbackData.put(Prefix, "sdncAssignRollbackReq", sdncAssignRollbackReq)
357 execution.setVariable("rollbackData", rollbackData)
359 msoLogger.debug("sdncAssignRollbackReq:\n" + sdncAssignRollbackReq)
360 msoLogger.debug("rollbackData:\n" + rollbackData.toString())
362 } catch (BpmnError e) {
364 } catch(Exception ex) {
365 msg = "Exception in preProcessSDNCAssign. " + ex.getMessage()
367 exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
369 msoLogger.debug("end preProcessSDNCAssign")
372 public void preProcessSDNCCreate(DelegateExecution execution) {
376 msoLogger.trace("start preProcessSDNCCreate")
379 String sdncRequestId = UUID.randomUUID().toString()
380 String sdncCreateReq = buildSDNCRequest(execution, "create", sdncRequestId)
381 execution.setVariable("sdncCreateRequest", sdncCreateReq)
382 msoLogger.debug("sdncCreateReq: " + sdncCreateReq)
383 def sdncRequestId2 = UUID.randomUUID().toString()
384 String sdncCreateRollbackReq = sdncCreateReq.replace(">create<", ">delete<").replace(">CreateTunnelXConnInstance<", ">DeleteTunnelXConnInstance<").replace(">${sdncRequestId}<", ">${sdncRequestId2}<")
385 def rollbackData = execution.getVariable("rollbackData")
386 rollbackData.put(Prefix, "sdncCreateRollbackReq", sdncCreateRollbackReq)
387 execution.setVariable("rollbackData", rollbackData)
389 msoLogger.debug("sdncCreateRollbackReq:\n" + sdncCreateRollbackReq)
390 msoLogger.debug("rollbackData:\n" + rollbackData.toString())
392 } catch (BpmnError e) {
394 } catch(Exception ex) {
395 msg = "Exception in preProcessSDNCCreate. " + ex.getMessage()
397 exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
399 msoLogger.trace("end preProcessSDNCCreate")
402 public void preProcessSDNCActivate(DelegateExecution execution) {
406 msoLogger.trace("start preProcessSDNCActivate")
409 String sdncRequestId = UUID.randomUUID().toString()
410 String sdncActivateReq = buildSDNCRequest(execution, "activate", sdncRequestId)
411 execution.setVariable("sdncActivateRequest", sdncActivateReq)
412 msoLogger.debug("sdncActivateReq: " + sdncActivateReq)
413 def sdncRequestId2 = UUID.randomUUID().toString()
414 String sdncActivateRollbackReq = sdncActivateReq.replace(">activate<", ">deactivate<").replace(">CreateTunnelXConnInstance<", ">DeleteTunnelXConnInstance<").replace(">${sdncRequestId}<", ">${sdncRequestId2}<")
415 def rollbackData = execution.getVariable("rollbackData")
416 rollbackData.put(Prefix, "sdncActivateRollbackReq", sdncActivateRollbackReq)
417 execution.setVariable("rollbackData", rollbackData)
419 msoLogger.debug("sdncActivateRollbackReq:\n" + sdncActivateRollbackReq)
420 msoLogger.debug("rollbackData:\n" + rollbackData.toString())
422 } catch (BpmnError e) {
424 } catch(Exception ex) {
425 msg = "Exception in preProcessSDNCActivate. " + ex.getMessage()
427 exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
429 msoLogger.trace("end preProcessSDNCActivate")
432 public void validateSDNCResp(DelegateExecution execution, String response, String method){
435 msoLogger.trace("start ValidateSDNCResponse Process")
439 WorkflowException workflowException = execution.getVariable("WorkflowException")
440 msoLogger.debug("workflowException: " + workflowException)
442 boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
443 msoLogger.debug("SDNCResponse: " + response)
445 SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
446 sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
448 if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
449 msoLogger.debug("Received a Good Response from SDNC Adapter for " + method + " SDNC Call. Response is: \n" + response)
451 if (!"get".equals(method))
453 def rollbackData = execution.getVariable("rollbackData")
454 rollbackData.put(Prefix, "rollback" + "SDNC" + method, "true")
455 execution.setVariable("rollbackData", rollbackData)
459 msoLogger.debug("Received a BAD Response from SDNC Adapter for " + method + " SDNC Call.")
460 throw new BpmnError("MSOWorkflowException")
462 } catch (BpmnError e) {
464 } catch(Exception ex) {
465 msg = "Exception in validateSDNCResp. " + ex.getMessage()
467 exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
469 msoLogger.trace("end ValidateSDNCResp Process")
472 public void preProcessSDNCGet(DelegateExecution execution){
474 msoLogger.trace("start preProcessSDNCGet")
477 def callbackUrl = execution.getVariable("sdncCallbackUrl")
478 // serviceOperation (URI for topology GET) will be retrieved from "selflink" from AAI if active AR exists in AAI
479 // or from "object-path" in SDNC response for assign when AR does not exist in AA
481 String serviceOperation = ""
483 if (execution.getVariable("foundActiveAR")) {
484 def aaiQueryResponse = execution.getVariable("aaiARGetResponse")
485 serviceOperation = utils.getNodeText(aaiQueryResponse, "selflink")
486 msoLogger.debug("AR service operation/aaiARSelfLink: " + serviceOperation)
490 String response = execution.getVariable("sdncAssignResponse")
491 String data = utils.getNodeXml(response, "response-data")
492 msoLogger.debug("Assign responseData: " + data)
493 serviceOperation = utils.getNodeText(data, "object-path")
494 msoLogger.debug("AR service operation:" + serviceOperation)
497 String serviceInstanceId = execution.getVariable("serviceInstanceId")
498 String sdncRequestId = UUID.randomUUID().toString()
500 //neeed the same url as used by vfmodules
501 String SDNCGetRequest =
502 """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
503 xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
504 xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
505 <sdncadapter:RequestHeader>
506 <sdncadapter:RequestId>${MsoUtils.xmlEscape(sdncRequestId)}</sdncadapter:RequestId>
507 <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
508 <sdncadapter:SvcAction>query</sdncadapter:SvcAction>
509 <sdncadapter:SvcOperation>${MsoUtils.xmlEscape(serviceOperation)}</sdncadapter:SvcOperation>
510 <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackUrl)}</sdncadapter:CallbackUrl>
511 <sdncadapter:MsoAction>vfmodule</sdncadapter:MsoAction>
512 </sdncadapter:RequestHeader>
513 <sdncadapterworkflow:SDNCRequestData></sdncadapterworkflow:SDNCRequestData>
514 </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
516 execution.setVariable("sdncGetRequest", SDNCGetRequest)
519 msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occurred Processing preProcessSDNCGetRequest.", "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
520 exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during SDNC GET Method:\n" + e.getMessage())
522 msoLogger.trace("end preProcessSDNCGet")
525 public void updateAaiAROrchStatus(DelegateExecution execution, String status){
527 msoLogger.trace("start updateAaiAROrchStatus")
528 String aaiARPath = execution.getVariable("aaiARPath") //set during query (existing AR) or create
529 AllottedResourceUtils arUtils = new AllottedResourceUtils(this)
530 String orchStatus = arUtils.updateAROrchStatus(execution, status, aaiARPath)
531 msoLogger.trace("end updateAaiAROrchStatus")
534 public void generateOutputs(DelegateExecution execution)
537 msoLogger.trace("start generateOutputs")
539 String sdncGetResponse = execution.getVariable("enhancedCallbackRequestData") //unescaped
540 msoLogger.debug("resp:" + sdncGetResponse)
541 String arData = utils.getNodeXml(sdncGetResponse, "tunnelxconn-topology")
542 arData = utils.removeXmlNamespaces(arData)
544 String txca = utils.getNodeXml(arData, "tunnelxconn-assignments")
545 execution.setVariable("vni", utils.getNodeText(txca, "vni"))
546 execution.setVariable("vgmuxBearerIP", utils.getNodeText(txca, "vgmux-bearer-ip"))
547 execution.setVariable("vgmuxLanIP", utils.getNodeText(txca, "vgmux-lan-ip"))
549 String ari = utils.getNodeXml(arData, "allotted-resource-identifiers")
550 execution.setVariable("allotedResourceName", utils.getNodeText(ari, "allotted-resource-name"))
551 } catch (BpmnError e) {
552 msoLogger.debug("BPMN Error in generateOutputs ")
553 } catch(Exception ex) {
554 String msg = "Exception in generateOutputs " + ex.getMessage()
557 msoLogger.trace("end generateOutputs")
561 public void preProcessRollback (DelegateExecution execution) {
563 msoLogger.trace("start preProcessRollback")
566 Object workflowException = execution.getVariable("WorkflowException");
568 if (workflowException instanceof WorkflowException) {
569 msoLogger.debug("Prev workflowException: " + workflowException.getErrorMessage())
570 execution.setVariable("prevWorkflowException", workflowException);
571 //execution.setVariable("WorkflowException", null);
573 } catch (BpmnError e) {
574 msoLogger.debug("BPMN Error during preProcessRollback")
575 } catch(Exception ex) {
576 String msg = "Exception in preProcessRollback. " + ex.getMessage()
579 msoLogger.trace("end preProcessRollback")
582 public void postProcessRollback (DelegateExecution execution) {
584 msoLogger.trace("start postProcessRollback")
587 Object workflowException = execution.getVariable("prevWorkflowException");
588 if (workflowException instanceof WorkflowException) {
589 msoLogger.debug("Setting prevException to WorkflowException: ")
590 execution.setVariable("WorkflowException", workflowException);
592 execution.setVariable("rollbackData", null)
593 } catch (BpmnError b) {
594 msoLogger.debug("BPMN Error during postProcessRollback")
596 } catch(Exception ex) {
597 msg = "Exception in postProcessRollback. " + ex.getMessage()
600 msoLogger.trace("end postProcessRollback")