From 3f49608f5c05b093c05a1e7f80b3ebfd2dd18f9a Mon Sep 17 00:00:00 2001 From: Dilip kumar Pampana Date: Fri, 30 Mar 2018 16:34:33 -0400 Subject: Changes made to Inbound/Design-Services Error Displayed in CDT while saving the artifacts to APPC DB using SAVE ALL TO APPC though the artifacts are saved in DB Issue-ID: APPC-817 Change-Id: I748dd099b3df2ace95b9930aec2fcf1de3f6d148 Signed-off-by: Dilip kumar Pampana --- .../onap/appc/design/dbervices/DesignDBService.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'appc-inbound/appc-design-services') diff --git a/appc-inbound/appc-design-services/provider/src/main/java/org/onap/appc/design/dbervices/DesignDBService.java b/appc-inbound/appc-design-services/provider/src/main/java/org/onap/appc/design/dbervices/DesignDBService.java index 02de3609c..83ef0f914 100644 --- a/appc-inbound/appc-design-services/provider/src/main/java/org/onap/appc/design/dbervices/DesignDBService.java +++ b/appc-inbound/appc-design-services/provider/src/main/java/org/onap/appc/design/dbervices/DesignDBService.java @@ -2,23 +2,21 @@ * ============LICENSE_START======================================================= * ONAP : APPC * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Copyright (C) 2017 Amdocs * ============================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. * ============LICENSE_END========================================================= */ @@ -197,7 +195,8 @@ public class DesignDBService { createArtifactTrackingRecord(payload, requestID, sdcArtifactId, sdcReferenceId); String status = getDataFromActionStatus(payload, STATUS); if (status == null || status.isEmpty()) { - setActionStatus(payload, "Not Tested"); + log.info("Action Status is: "+ status); + setActionStatus(payload, "Not Tested"); } linkstatusRelationShip(sdcArtifactId, sdcReferenceId, payload); @@ -227,9 +226,9 @@ public class DesignDBService { if (payloadObject.get(DesignServiceConstants.VNFC_TYPE) != null && !payloadObject .get(DesignServiceConstants.VNFC_TYPE).textValue().isEmpty()) { - queryString = queryString + " AND VNFC_TYPE = ? ) )"; + queryString = queryString + " AND VNFC_TYPE = ? GROUP BY VNF_TYPE HAVING COUNT(VNF_TYPE)>=1 ) )"; } else { - queryString = queryString + " ) ) "; + queryString = queryString + " GROUP BY VNF_TYPE HAVING COUNT(VNF_TYPE)>=1 ) ) "; } log.info(QUERY_STR + queryString); boolean data = dbservice.updateDBData(queryString, argList); @@ -310,6 +309,7 @@ public class DesignDBService { if (payloadObject.get(DesignServiceConstants.VNFC_TYPE) != null && !payloadObject .get(DesignServiceConstants.VNFC_TYPE).textValue().isEmpty()) { argList.add(payloadObject.get(DesignServiceConstants.VNFC_TYPE).textValue()); + log.info("Vnfc-Type: " + payloadObject.get(DesignServiceConstants.VNFC_TYPE).textValue()); } else { argList.add(null); } @@ -322,6 +322,8 @@ public class DesignDBService { } argList.add(status); + log.info("QueryString: " + insertQuery); + log.info("Arguments List: " + argList); boolean updateStatus = dbservice.updateDBData(insertQuery, argList); if (!updateStatus) throw new DBException("Error while updating Action Status"); -- cgit 1.2.3-korg