2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
6 * ================================================================================
7 * Modifications Copyright (c) 2019 Samsung
8 * ================================================================================
9 * Licensed under the Apache License, Version 2.0 (the "License")
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 * ============LICENSE_END=========================================================
23 package org.onap.so.bpmn.infrastructure.scripts
25 import org.onap.so.bpmn.common.scripts.ExternalAPIUtilFactory
27 import javax.ws.rs.NotFoundException
28 import javax.ws.rs.core.Response
30 import org.apache.commons.lang3.StringUtils
31 import static org.apache.commons.lang3.StringUtils.*
32 import org.camunda.bpm.engine.delegate.BpmnError
33 import org.camunda.bpm.engine.delegate.DelegateExecution
34 import org.json.JSONArray
35 import org.json.JSONObject
36 import org.onap.aai.domain.yang.SpPartner
37 import org.onap.so.bpmn.common.recipe.ResourceInput
38 import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
39 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
40 import org.onap.so.bpmn.common.scripts.ExceptionUtil
41 import org.onap.so.bpmn.common.scripts.ExternalAPIUtil
42 import org.onap.so.bpmn.core.json.JsonUtils
43 import org.onap.so.bpmn.core.UrnPropertiesReader
44 import org.onap.aaiclient.client.aai.AAIObjectType
45 import org.onap.aaiclient.client.aai.AAIResourcesClient
46 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
47 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
48 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
49 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
50 import org.slf4j.Logger
51 import org.slf4j.LoggerFactory
54 * This groovy class supports the <class>Delete3rdONAPE2EServiceInstance.bpmn</class> process.
55 * flow for Delete 3rdONAPE2EServiceInstance in 3rdONAP
57 public class Delete3rdONAPE2EServiceInstance extends AbstractServiceTaskProcessor {
59 String Prefix = "CRE3rdONAPESI_"
61 ExceptionUtil exceptionUtil = new ExceptionUtil()
63 JsonUtils jsonUtil = new JsonUtils()
65 private static final Logger logger = LoggerFactory.getLogger( Delete3rdONAPE2EServiceInstance.class)
67 public void checkSPPartnerInfoFromAAI (DelegateExecution execution) {
68 logger.info(" ***** Started checkSPPartnerInfo *****")
70 //get bpmn inputs from resource request.
71 String requestId = execution.getVariable("mso-request-id")
72 String requestAction = execution.getVariable("requestAction")
73 logger.info("The requestAction is: " + requestAction)
74 String recipeParamsFromRequest = execution.getVariable("recipeParams")
75 logger.info("The recipeParams is: " + recipeParamsFromRequest)
76 String resourceInput = execution.getVariable("resourceInput")
77 logger.info("The resourceInput is: " + resourceInput)
78 //Get ResourceInput Object
79 ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(resourceInput, ResourceInput.class)
80 // set local resourceInput
81 execution.setVariable(Prefix + "ResourceInput", resourceInputObj)
83 String resourceInstanceId = resourceInputObj.getResourceInstancenUuid()
84 String sppartnerId = resourceInstanceId
85 execution.setVariable(Prefix + "SppartnerId", sppartnerId)
87 // Get Sppartner from AAI
88 getSPPartnerInAAI(execution)
90 String callSource = "UUI"
91 String sppartnerUrl = ""
92 if(execution.hasVariable(Prefix + "CallSource")) {
93 callSource = execution.getVariable(Prefix + "CallSource")
94 sppartnerUrl = execution.getVariable(Prefix + "SppartnerUrl")
97 boolean is3rdONAPExist = false
98 if(!isBlank(sppartnerUrl)) {
102 execution.setVariable("Is3rdONAPExist", is3rdONAPExist)
103 execution.setVariable(Prefix + "ServiceInstanceId", resourceInputObj.getServiceInstanceId())
104 execution.setVariable("mso-request-id", requestId)
105 execution.setVariable("mso-service-instance-id", resourceInputObj.getServiceInstanceId())
107 } catch (Exception ex){
108 String msg = "Exception in checkSPPartnerInfoFromAAI " + ex.getMessage()
110 // exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
114 public void checkLocallCall (DelegateExecution execution) {
115 logger.info(" ***** Started checkLocallCall *****")
117 boolean isLocalCall = true
118 String callSource = execution.getVariable(Prefix + "CallSource")
119 if("ExternalAPI".equalsIgnoreCase(callSource)) {
122 execution.setVariable("IsLocalCall", isLocalCall)
125 public void preProcessRequest(DelegateExecution execution){
126 logger.info(" ***** Started preProcessRequest *****")
130 ResourceInput resourceInputObj = execution.getVariable(Prefix + "ResourceInput")
132 String globalSubscriberId = resourceInputObj.getGlobalSubscriberId()
133 if (isBlank(globalSubscriberId)) {
134 msg = "Input globalSubscriberId is null"
138 execution.setVariable("globalSubscriberId", globalSubscriberId)
139 logger.info( "globalSubscriberId:" + globalSubscriberId)
141 String serviceType = resourceInputObj.getServiceType()
142 if (isBlank(serviceType)) {
143 msg = "Input serviceType is null"
146 execution.setVariable("serviceType", serviceType)
147 logger.info( "serviceType:" + serviceType)
149 String operationId = resourceInputObj.getOperationId()
150 if (isBlank(operationId)) {
151 msg = "Input operationId is null"
154 execution.setVariable("operationId", operationId)
155 logger.info( "operationId:" + operationId)
157 String resourceName = resourceInputObj.getResourceInstanceName()
158 if (isBlank(resourceName)) {
159 msg = "Input resourceName is null"
162 execution.setVariable("resourceName", resourceName)
163 logger.info("resourceName:" + resourceName)
165 String resourceTemplateId = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
166 if (isBlank(resourceTemplateId)) {
167 msg = "Input resourceTemplateId is null"
170 execution.setVariable("resourceTemplateId", resourceTemplateId)
171 logger.info( "resourceTemplateId:" + resourceTemplateId)
173 } catch (Exception ex){
174 msg = "Exception in preProcessRequest " + ex.getMessage()
176 // exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
180 public void prepareUpdateProgress(DelegateExecution execution) {
181 logger.info(" ***** Started prepareUpdateProgress *****")
182 ResourceInput resourceInputObj = execution.getVariable(Prefix + "ResourceInput")
183 String operType = resourceInputObj.getOperationType()
184 String resourceCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
185 String ServiceInstanceId = resourceInputObj.getServiceInstanceId()
186 String modelName = resourceInputObj.getResourceModelInfo().getModelName()
187 String operationId = resourceInputObj.getOperationId()
188 String progress = execution.getVariable("progress")
189 String status = execution.getVariable("status")
190 String statusDescription = execution.getVariable("statusDescription")
193 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
194 xmlns:ns="http://org.onap.so/requestsdb">
197 <ns:updateResourceOperationStatus>
198 <operType>${operType}</operType>
199 <operationId>${operationId}</operationId>
200 <progress>${progress}</progress>
201 <resourceTemplateUUID>${resourceCustomizationUuid}</resourceTemplateUUID>
202 <serviceId>${ServiceInstanceId}</serviceId>
203 <status>${status}</status>
204 <statusDescription>${statusDescription}</statusDescription>
205 </ns:updateResourceOperationStatus>
207 </soapenv:Envelope>"""
209 setProgressUpdateVariables(execution, body)
210 logger.info(" ***** End prepareUpdateProgress *****")
213 public void prepare3rdONAPRequest(DelegateExecution execution) {
214 logger.info(" ***** Started prepare3rdONAPRequest *****")
216 String sppartnerUrl = execution.getVariable(Prefix + "SppartnerUrl")
217 String extAPIPath = sppartnerUrl + '/serviceOrder'
218 execution.setVariable("ExternalAPIURL", extAPIPath)
220 // ExternalAPI message format
221 String externalId = execution.getVariable("resourceName")
222 String serviceType = execution.getVariable("serviceType")
223 String category = "E2E Service"
224 String description = "Service Order from SPPartner"
225 String requestedStartDate = utils.generateCurrentTimeInUtc()
226 String requestedCompletionDate = utils.generateCurrentTimeInUtc()
227 String priority = "1" // 0-4 0:highest
228 String subscriberId = execution.getVariable("globalSubscriberId")
229 String customerRole = "ONAPcustomer"
230 // Below SO will pass serviceType as subscriberName and externalAPI will use
231 // the same serviceType in another domain instead of model name
232 String subscriberName = serviceType
233 String referredType = "Consumer"
234 String orderItemId = "1"
235 String action = "delete" //for delete
236 String serviceState = "active"
237 String serviceName = ""
238 String serviceId = execution.getVariable(Prefix + "SppartnerId")
240 queryServicefrom3rdONAP(execution)
241 String serviceSpecificationId = execution.getVariable(Prefix + "ServiceSpecificationId")
243 Map<String, String> valueMap = new HashMap<>()
244 valueMap.put("externalId", '"' + externalId + '"')
245 valueMap.put("category", '"' + category + '"')
246 valueMap.put("description", '"' + description + '"')
247 valueMap.put("requestedStartDate", '"' + requestedStartDate + '"')
248 valueMap.put("requestedCompletionDate", '"' + requestedCompletionDate + '"')
249 valueMap.put("priority", '"'+ priority + '"')
250 valueMap.put("subscriberId", '"' + subscriberId + '"')
251 valueMap.put("customerRole", '"' + customerRole + '"')
252 valueMap.put("subscriberName", '"' + subscriberName + '"')
253 valueMap.put("referredType", '"' + referredType + '"')
254 valueMap.put("orderItemId", '"' + orderItemId + '"')
255 valueMap.put("action", '"' + action + '"')
256 valueMap.put("serviceState", '"' + serviceState + '"')
257 valueMap.put("serviceId", '"' + serviceId + '"')
258 valueMap.put("serviceName", "null")
259 valueMap.put("serviceUuId", '"' + serviceSpecificationId + '"')
261 ExternalAPIUtil externalAPIUtil = new ExternalAPIUtilFactory().create()
263 valueMap.put("_requestInputs_", "")
265 String payload = externalAPIUtil.setTemplate(ExternalAPIUtil.PostServiceOrderRequestsTemplate, valueMap)
266 execution.setVariable(Prefix + "Payload", payload)
267 logger.info( "***** Exit prepare3rdONAPRequest *****")
270 private void queryServicefrom3rdONAP(DelegateExecution execution)
272 logger.info(" ***** Started queryServicefrom3rdONAP *****")
275 String globalSubscriberId = execution.getVariable("globalSubscriberId")
276 String SppartnerServiceId = execution.getVariable(Prefix + "SppartnerId")
278 //https://{api_url}/nbi/api/v1/service?relatedParty.id=${globalSubscriberId}
279 String sppartnerUrl = execution.getVariable(Prefix + "SppartnerUrl")
280 String extAPIPath = sppartnerUrl + "/service?relatedParty.id=" + globalSubscriberId
281 logger.debug("queryServicefrom3rdONAP externalAPIURL is: " + extAPIPath)
283 ExternalAPIUtil externalAPIUtil = new ExternalAPIUtilFactory().create()
285 Response response = externalAPIUtil.executeExternalAPIGetCall(execution, extAPIPath)
287 int responseCode = response.getStatus()
288 execution.setVariable(Prefix + "GetServiceResponseCode", responseCode)
289 logger.debug("Get Service response code is: " + responseCode)
291 String extApiResponse = response.readEntity(String.class)
293 execution.setVariable(Prefix + "GetServiceResponse", extApiResponse)
294 logger.debug("queryServicefrom3rdONAP response body is: " + extApiResponse)
296 //Process Response //200 OK 201 CREATED 202 ACCEPTED
297 if(responseCode == 200 || responseCode == 201 || responseCode == 202 )
299 logger.debug("Get Service Received a Good Response")
300 JSONArray responseList = new JSONArray(extApiResponse)
301 for(int i=0; i< responseList.length(); i++) {
302 JSONObject obj = responseList.getJSONObject(i)
303 String svcId = obj.get("id")
304 if(StringUtils.equalsIgnoreCase(SppartnerServiceId, svcId)) {
305 JSONObject serviceSpecification = obj.get("serviceSpecification")
306 String serviceUuid = serviceSpecification.get("id")
307 execution.setVariable(Prefix + "ServiceSpecificationId", serviceUuid)
313 logger.error("Get Service Received a Bad Response Code. Response Code is: " + responseCode)
314 // exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Get Service Received a bad response from 3rdONAP External API")
316 }catch(Exception e) {
317 logger.error("queryServicefrom3rdONAP exception:" + e.getMessage())
319 logger.info( "***** Exit queryServicefrom3rdONAP *****")
322 public void doDeleteE2ESIin3rdONAP(DelegateExecution execution) {
323 logger.info(" ***** Started doDeleteE2ESIin3rdONAP *****")
325 String extAPIPath = execution.getVariable("ExternalAPIURL")
326 String payload = execution.getVariable(Prefix + "Payload")
327 logger.debug("doDeleteE2ESIin3rdONAP externalAPIURL is: " + extAPIPath)
328 logger.debug("doDeleteE2ESIin3rdONAP payload is: " + payload)
330 ExternalAPIUtil externalAPIUtil = new ExternalAPIUtilFactory().create()
331 execution.setVariable("ServiceOrderId", "")
333 Response response = externalAPIUtil.executeExternalAPIPostCall(execution, extAPIPath, payload)
335 int responseCode = response.getStatus()
336 execution.setVariable(Prefix + "PostServiceOrderResponseCode", responseCode)
337 logger.debug("Post ServiceOrder response code is: " + responseCode)
339 String extApiResponse = response.readEntity(String.class)
340 JSONObject responseObj = new JSONObject(extApiResponse)
341 execution.setVariable(Prefix + "PostServiceOrderResponse", extApiResponse)
343 logger.debug("doDeleteE2ESIin3rdONAP response body is: " + extApiResponse)
346 if(responseCode == 200 || responseCode == 201 || responseCode == 202 )
347 //200 OK 201 CREATED 202 ACCEPTED
349 logger.debug("Post ServiceOrder Received a Good Response")
350 String serviceOrderId = responseObj.get("id")
351 execution.setVariable(Prefix + "SuccessIndicator", true)
352 execution.setVariable("ServiceOrderId", serviceOrderId)
353 logger.info("Post ServiceOrderid is: " + serviceOrderId)
356 logger.error("Post ServiceOrder Received a Bad Response Code. Response Code is: " + responseCode)
357 // exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Post ServiceOrder Received a bad response from 3rdONAP External API")
359 }catch(Exception e) {
360 logger.error("doDeleteE2ESIin3rdONAP exception:" + e.getMessage())
362 logger.info( "***** Exit doDeleteE2ESIin3rdONAP *****")
366 public void getE2ESIProgressin3rdONAP(DelegateExecution execution) {
367 logger.info(" ***** Started getE2ESIProgressin3rdONAP *****")
370 String extAPIPath = execution.getVariable("ExternalAPIURL")
371 extAPIPath += "/" + execution.getVariable("ServiceOrderId")
372 logger.debug("getE2ESIProgressin3rdONAP delete externalAPIURL is: " + extAPIPath)
374 ExternalAPIUtil externalAPIUtil = new ExternalAPIUtilFactory().create()
376 Response response = externalAPIUtil.executeExternalAPIGetCall(execution, extAPIPath)
378 int responseCode = response.getStatus()
379 execution.setVariable(Prefix + "GetServiceOrderResponseCode", responseCode)
380 logger.debug("Get ServiceOrder response code is: " + responseCode)
382 String extApiResponse = response.readEntity(String.class)
383 JSONObject responseObj = new JSONObject(extApiResponse)
384 execution.setVariable(Prefix + "GetServiceOrderResponse", extApiResponse)
386 logger.debug( "getE2ESIProgressin3rdONAP delete response body is: " + extApiResponse)
388 //Process Response //200 OK 201 CREATED 202 ACCEPTED
389 if(responseCode == 200 || responseCode == 201 || responseCode == 202 )
391 logger.debug("Get ServiceOrder Received a Good Response")
393 String orderState = responseObj.get("state")
394 if("REJECTED".equalsIgnoreCase(orderState)) {
395 execution.setVariable("progress", 100)
396 execution.setVariable("status", "error")
397 execution.setVariable("statusDescription", "Delete Service Order Status is REJECTED")
401 JSONArray items = responseObj.getJSONArray("orderItem")
402 JSONObject item = items[0]
403 JSONObject service = item.get("service")
404 String sppartnerServiceId = service.get("id")
405 if(sppartnerServiceId == null || sppartnerServiceId.equals("null")) {
406 execution.setVariable("progress", 100)
407 execution.setVariable("status", "error")
408 execution.setVariable("statusDescription", "Delete Service Order Status get null sppartnerServiceId")
409 logger.error("null sppartnerServiceId while getting progress from externalAPI")
412 execution.setVariable(Prefix + "SppartnerServiceId", sppartnerServiceId)
414 String serviceOrderState = item.get("state")
415 execution.setVariable(Prefix + "SuccessIndicator", true)
416 execution.setVariable("ServiceOrderState", serviceOrderState)
418 // Get serviceOrder State and process progress
419 if("ACKNOWLEDGED".equalsIgnoreCase(serviceOrderState)) {
420 execution.setVariable("progress", 15)
421 execution.setVariable("status", "processing")
422 execution.setVariable("statusDescription", "Delete Service Order Status is " + serviceOrderState)
424 else if("INPROGRESS".equalsIgnoreCase(serviceOrderState)) {
425 execution.setVariable("progress", 40)
426 execution.setVariable("status", "processing")
427 execution.setVariable("statusDescription", "Delete Service Order Status is " + serviceOrderState)
429 else if("COMPLETED".equalsIgnoreCase(serviceOrderState)) {
430 execution.setVariable("progress", 100)
431 execution.setVariable("status", "finished")
432 execution.setVariable("statusDescription", "Delete Service Order Status is " + serviceOrderState)
434 else if("FAILED".equalsIgnoreCase(serviceOrderState)) {
435 execution.setVariable("progress", 100)
436 execution.setVariable("status", "error")
437 execution.setVariable("statusDescription", "Delete Service Order Status is " + serviceOrderState)
440 execution.setVariable("progress", 100)
441 execution.setVariable("status", "error")
442 execution.setVariable("statusDescription", "Delete Service Order Status is unknown")
446 logger.debug("Get ServiceOrder Received a Bad Response Code. Response Code is: " + responseCode)
447 execution.setVariable("progress", 100)
448 execution.setVariable("status", "error")
449 execution.setVariable("statusDescription", "Get Delete ServiceOrder Received a bad response")
450 // exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Get Delete ServiceOrder Received a bad response from 3rdONAP External API")
452 }catch(Exception e) {
453 execution.setVariable("progress", 100)
454 execution.setVariable("status", "error")
455 execution.setVariable("statusDescription", "Get Delete ServiceOrder Exception")
456 logger.error("getE2ESIProgressin3rdONAP exception:" + e.getMessage())
458 logger.info( "***** Exit getE2ESIProgressin3rdONAP *****")
464 public void timeDelay(DelegateExecution execution) {
467 } catch(InterruptedException e) {
468 logger.error("Time Delay exception" + e )
472 private void getSPPartnerInAAI(DelegateExecution execution) {
473 logger.info(" ***** Started getSPPartnerInAAI *****")
475 String id = execution.getVariable(Prefix + "SppartnerId")
477 AAIResourcesClient client = new AAIResourcesClient()
478 AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().spPartner(id))
479 SpPartner sp = client.get(uri).asBean(SpPartner.class).get()
481 logger.debug("GET sppartner Received a Good Response")
482 execution.setVariable(Prefix + "SuccessIndicator", true)
483 execution.setVariable(Prefix + "FoundIndicator", true)
485 // String sppartnerId = sp.getSpPartnerId()
486 // execution.setVariable(Prefix + "SppartnerId", sppartnerId)
487 // logger.debug(" SppartnerId is: " + sppartnerId)
488 String sppartnerUrl = sp.getUrl()
489 execution.setVariable(Prefix + "SppartnerUrl", sppartnerUrl)
490 logger.debug(" SppartnerUrl is: " + sppartnerUrl)
491 String callSource = sp.getCallsource()
492 execution.setVariable(Prefix + "CallSource", callSource)
493 logger.debug(" CallSource is: " + callSource)
494 String sppartnerVersion = sp.getResourceVersion()
495 execution.setVariable(Prefix + "SppartnerVersion", sppartnerVersion)
496 logger.debug(" Resource Version is: " + sppartnerVersion)
497 } catch (Exception ex) {
498 String msg = "Exception in Delete3rdONAPE2EServiceInstance.saveSPPartnerInAAI. " + ex.getMessage()
500 // throw new BpmnError("MSOWorkflowException")
503 logger.info( "***** Exit getSPPartnerInAAI *****")
506 public void deleteSPPartnerInAAI(DelegateExecution execution) {
507 logger.info(" ***** Started deleteSPPartnerInAAI *****")
510 String sppartnerId = execution.getVariable(Prefix + "SppartnerId")
512 AAIResourcesClient client = new AAIResourcesClient()
513 AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().spPartner(sppartnerId))
515 logger.debug("Delete sppartner Received a Good Response")
516 execution.setVariable(Prefix + "SuccessIndicator", true)
517 } catch (Exception ex) {
518 String msg = "Exception in Delete3rdONAPE2EServiceInstance.deleteSPPartnerInAAI. " + ex.getMessage()
520 // throw new BpmnError("MSOWorkflowException")
524 logger.info( "**** Exit deleteSPPartnerInAAI ****")
527 private void setProgressUpdateVariables(DelegateExecution execution, String body) {
528 def dbAdapterEndpoint = UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint", execution)
529 execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
530 execution.setVariable("CVFMI_updateResOperStatusRequest", body)
533 public void postProcess(DelegateExecution execution){
534 logger.info(" ***** Started postProcess *****")
535 String responseCode = execution.getVariable(Prefix + "PutSppartnerResponseCode")
536 String responseObj = execution.getVariable(Prefix + "PutSppartnerResponse")
538 logger.info("response from AAI for put sppartner, response code :" + responseCode + " response object :" + responseObj)
539 logger.info(" ***** Exit postProcess *****")
542 public void sendSyncResponse (DelegateExecution execution) {
543 logger.debug(" *** sendSyncResponse *** ")
546 String operationStatus = "finished"
547 // RESTResponse for main flow
548 String resourceOperationResp = """{"operationStatus":"${operationStatus}"}""".trim()
549 logger.debug(" sendSyncResponse to APIH:" + "\n" + resourceOperationResp)
550 sendWorkflowResponse(execution, 202, resourceOperationResp)
551 execution.setVariable("sentSyncResponse", true)
553 } catch (Exception ex) {
554 String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage()
556 // exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
558 logger.debug(" ***** Exit sendSyncResopnse *****")