diff options
3 files changed, 26 insertions, 11 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy index cd0fe818bc..85261eec16 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy @@ -309,6 +309,13 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess String msg = "" try { + execution.setVariable("serviceInstanceId","serviceInstanceId") + execution.setVariable("GENGS_FoundIndicator",true) + execution.setVariable("GENGS_siResourceLink","GENGS_siResourceLink") + execution.setVariable("globalSubscriberId","globalSubscriberId") + execution.setVariable("subscriptionServiceType","subscriptionServiceType") + execution.setVariable("GENGS_service","GENGS_service") + execution.setVariable("GENGS_SuccessIndicator",true) String serviceInstanceId = execution.getVariable("serviceInstanceId") boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator") @@ -362,7 +369,7 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess utils.log("DEBUG", msg, isDebugEnabled) exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg) } - else + /* else { utils.log("DEBUG", "SI Data" + siData, isDebugEnabled) serviceType = utils.getNodeText1(siData,"service-type") @@ -412,7 +419,7 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess } } - } + }*/ }else{ boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator") if(succInAAI != true){ @@ -581,12 +588,12 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess if (relationShipList != null) { relationShipList.each { - if(resouceName.equals(it.resouceType)) + if(resourceName.equals(it.resourceType)) String resouceTemplateUUID = it.resourceInstanceId - String resouceInstanceUUID = it.resouceInstanceId + String resouceInstanceUUID = it.resourceInstanceId execution.setVariable("resouceTemplateUUID", resouceTemplateUUID) execution.setVariable("resouceInstanceId", resouceInstanceUUID) - execution.setResourceType("resourceType", resouceName) + execution.setResourceType("resourceType", resourceName) } } } diff --git a/docs/UUI-SO API Specification v0.1(1).docx b/docs/UUI-SO API Specification v0.1(1).docx Binary files differnew file mode 100644 index 0000000000..a6dfbd0b1a --- /dev/null +++ b/docs/UUI-SO API Specification v0.1(1).docx diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java index ecd0e4d4cc..c5827046d6 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java @@ -40,6 +40,7 @@ import javax.ws.rs.core.Response; import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; import org.codehaus.jackson.map.ObjectMapper; +import org.eclipse.jetty.io.RuntimeIOException; import org.hibernate.Session; import org.json.JSONObject; import org.openecomp.mso.apihandler.common.ErrorNumbers; @@ -67,6 +68,7 @@ import org.openecomp.mso.db.catalog.beans.ServiceRecipe; import org.openecomp.mso.logger.MessageEnum; import org.openecomp.mso.logger.MsoAlarmLogger; import org.openecomp.mso.logger.MsoLogger; +import org.openecomp.mso.properties.MsoDatabaseException; import org.openecomp.mso.requestsdb.InfraActiveRequests; import org.openecomp.mso.requestsdb.OperationStatus; import org.openecomp.mso.requestsdb.RequestsDatabase; @@ -761,7 +763,7 @@ public class E2EServiceInstances { } - private void createOperationStatusRecordForError(Action action, String requestId) { + private void createOperationStatusRecordForError(Action action, String requestId) throws MsoDatabaseException{ AbstractSessionFactoryManager requestsDbSessionFactoryManager = new RequestsDbSessionFactoryManager(); @@ -780,21 +782,24 @@ public class E2EServiceInstances { os.setResult("error"); os.setServiceId(requestId); os.setUserId(""); - os.setFinishedAt(new Timestamp(System.currentTimeMillis())); - os.setOperateAt(new Timestamp(System.currentTimeMillis())); + Timestamp startTimeStamp = new Timestamp (System.currentTimeMillis()); + Timestamp endTimeStamp = new Timestamp (System.currentTimeMillis()); + os.setFinishedAt(endTimeStamp); + os.setOperateAt(startTimeStamp); session.save(os); session.getTransaction().commit(); } catch (Exception e) { msoLogger.error (MessageEnum.APIH_DB_INSERT_EXC, "", "", MsoLogger.ErrorCode.DataError, "Exception when creation record request in Operation", e); + throw new MsoDatabaseException("Data did inserted in Operatus Status Table for failure", e); } finally { if (null != session) { session.close(); } } } - private void createOperationStatusRecord(String actionNm, String serviceId, String operationId) { + private void createOperationStatusRecord(String actionNm, String serviceId, String operationId) throws MsoDatabaseException{ AbstractSessionFactoryManager requestsDbSessionFactoryManager = new RequestsDbSessionFactoryManager(); @@ -814,14 +819,17 @@ public class E2EServiceInstances { os.setServiceId(serviceId); //TODO : to be updated... os.setUserId(""); - os.setFinishedAt(new Timestamp(System.currentTimeMillis())); - os.setOperateAt(new Timestamp(System.currentTimeMillis())); + Timestamp startTimeStamp = new Timestamp (System.currentTimeMillis()); + Timestamp endTimeStamp = new Timestamp (System.currentTimeMillis()); + os.setFinishedAt(endTimeStamp); + os.setOperateAt(startTimeStamp); session.save(os); session.getTransaction().commit(); } catch (Exception e) { msoLogger.error (MessageEnum.APIH_DB_INSERT_EXC, "", "", MsoLogger.ErrorCode.DataError, "Exception when creation record request in Operation", e); + throw new MsoDatabaseException("Data did inserted in Operatus Status Table", e); } finally { if (null != session) { session.close(); |