diff options
author | Determe, Sebastien (sd378r) <sd378r@intl.att.com> | 2017-05-09 03:55:30 -0700 |
---|---|---|
committer | Determe, Sebastien (sd378r) <sd378r@intl.att.com> | 2017-05-09 05:18:51 -0700 |
commit | b1e5734ef566af5d49ba17d05ca0ab7b56d6666d (patch) | |
tree | 92a232e908ae587cb244fd102e9c2c5648c66a9f /bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy | |
parent | d4f2190943216278826f39e7010d57f872bda90d (diff) |
[MSO-8] Additional fixes for the second rebase
DB fixes + BPMN flows and groovy fixes + Fix issue with CloudConfig file
not reloaded properly when it's wrong (JSON error or model hierarchy
mistake) at MSO startup
Change-Id: I2853030b78499e2a761706b643ea210955e72de3
Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
[MSO-8] Restore files removed in patch set 2
Those groovy files must be there
Change-Id: I9a47ac3d9c8fc06774a1b8f518491b1b0b00af04
Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy')
-rw-r--r-- | bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy index 1e6541e..0e9fd7f 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy @@ -106,8 +106,12 @@ public class DoCreateServiceInstanceRollback extends AbstractServiceTaskProcesso execution.setVariable("skipRollback", true)
}
- def sdncRollbackRequest = rollbackData.get("SERVICEINSTANCE", "sdncRollbackRequest")
- execution.setVariable("sdncRollbackRequest", sdncRollbackRequest)
+ def sdncDelete = rollbackData.get("SERVICEINSTANCE", "sdncDelete")
+ execution.setVariable("sdncDelete", sdncDelete)
+ def sdncDeactivate = rollbackData.get("SERVICEINSTANCE", "sdncDeactivate")
+ execution.setVariable("sdncDeactivate", sdncDeactivate)
+ utils.log("DEBUG","sdncDeactivate:\n" + sdncDeactivate, isDebugEnabled)
+ utils.log("DEBUG","sdncDelete:\n" + sdncDelete, isDebugEnabled)
}
else {
execution.setVariable("skipRollback", true)
@@ -131,31 +135,33 @@ public class DoCreateServiceInstanceRollback extends AbstractServiceTaskProcesso utils.log("DEBUG"," ***** Exit preProcessRequest *****", isDebugEnabled)
}
- public void validateSDNCResponse(Execution execution) {
+ public void validateSDNCResponse(Execution execution, String response, String method) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
utils.log("DEBUG"," ***** validateSDNCResponse ***** ", isDebugEnabled)
String msg = ""
try {
WorkflowException workflowException = execution.getVariable("WorkflowException")
-
boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
- String response = execution.getVariable("sdncAdapterResponse")
-
+ utils.log("DEBUG", "SDNCResponse: " + response, isDebugEnabled)
+ utils.log("DEBUG", "workflowException: " + workflowException, isDebugEnabled)
+
SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
- utils.log("DEBUG", "SDNC Adapter for service-instance delete for rollback successful. response", isDebugEnabled)
+ msg = "SDNC Adapter service-instance rollback successful for " + method
+ utils.log("DEBUG", msg, isDebugEnabled)
}else{
execution.setVariable("rolledBack", false)
- execution.setVariable("rollbackError", "Error Response from SDNC Adapter for service-instance delete for rollback")
- utils.log("DEBUG","Error Response from SDNC Adapter for service-instance delete for rollback", isDebugEnabled)
+ msg = "Error Response from SDNC Adapter service-instance rollback for " + method
+ execution.setVariable("rollbackError", msg)
+ utils.log("DEBUG", msg, isDebugEnabled)
throw new BpmnError("MSOWorkflowException")
}
} catch (BpmnError e) {
throw e;
} catch (Exception ex){
- msg = "Exception in Create ServiceInstance Rollback validateSDNCResponse " + ex.getMessage()
+ msg = "Exception in Create ServiceInstance rollback for " + method + " Exception:" + ex.getMessage()
utils.log("DEBUG", msg, isDebugEnabled)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
@@ -187,7 +193,7 @@ public class DoCreateServiceInstanceRollback extends AbstractServiceTaskProcesso utils.log("DEBUG","*** Exit postProcessRequest ***", isDebugEnabled)
} catch (BpmnError e) {
- msg = "Exception in Create ServiceInstance Rollback postProcessRequest. " + ex.getMessage()
+ msg = "Exception in Create ServiceInstance Rollback postProcessRequest. " + e.getMessage()
utils.log("DEBUG", msg, isDebugEnabled)
} catch (Exception ex) {
msg = "Exception in Create ServiceInstance Rollback postProcessRequest. " + ex.getMessage()
|