From 77acb695ad1226e7ae71be7f5523672e4e5e1995 Mon Sep 17 00:00:00 2001 From: subhash kumar singh Date: Mon, 6 Aug 2018 17:53:02 +0530 Subject: Rename files to add SDNC Rename files to add SDNC. Change-Id: Idc98299c7970c42caba10005449fd21094a2239d Issue-ID: SO-689 Signed-off-by: subhash kumar singh --- .../scripts/DeActivateNetworkResource.groovy | 89 ----------- .../scripts/DeActivateSDNCNetworkResource.groovy | 89 +++++++++++ .../subprocess/DeActivateNetworkResource.bpmn | 177 --------------------- .../subprocess/DeActivateSDNCNetworkResource.bpmn | 177 +++++++++++++++++++++ 4 files changed, 266 insertions(+), 266 deletions(-) delete mode 100644 bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateNetworkResource.groovy create mode 100644 bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy delete mode 100644 bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DeActivateNetworkResource.bpmn create mode 100644 bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DeActivateSDNCNetworkResource.bpmn (limited to 'bpmn/so-bpmn-infrastructure-flows') diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateNetworkResource.groovy deleted file mode 100644 index 52249f0300..0000000000 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateNetworkResource.groovy +++ /dev/null @@ -1,89 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * OPENECOMP - SO - * ================================================================================ - * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. - * ================================================================================ - * 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. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.mso.bpmn.infrastructure.scripts - -import org.apache.commons.lang3.StringUtils -import org.camunda.bpm.engine.delegate.BpmnError -import org.json.JSONObject -import org.json.XML -import org.openecomp.mso.bpmn.common.recipe.ResourceInput -import org.openecomp.mso.bpmn.common.resource.ResourceRequestBuilder -import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor -import org.camunda.bpm.engine.delegate.DelegateExecution -import org.openecomp.mso.bpmn.core.json.JsonUtils -import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil -import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils - -/** - * This groovy class supports the ActivateSDNCCNetworkResource.bpmn process. - * flow for SDNC Network Resource Activate - */ -public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor { - - String Prefix = "ACTSDNCRES_" - - ExceptionUtil exceptionUtil = new ExceptionUtil() - - JsonUtils jsonUtil = new JsonUtils() - - SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils() - - public void preProcessRequest(DelegateExecution execution) { - def isDebugEnabled = execution.getVariable("isDebugLogEnabled") - utils.log("INFO"," ***** started preProcessRequest*****", isDebug) - } - - public void prepareSDNCRequest(DelegateExecution execution) { - def isDebugEnabled = execution.getVariable("isDebugLogEnabled") - utils.log("INFO"," ***** started prepareSDNCRequest *****", isDebug) - } - - public void prepareUpdateAfterDeActivateSDNCResource(DelegateExecution execution) { - def isDebugEnabled = execution.getVariable("isDebugLogEnabled") - utils.log("INFO"," ***** started prepareUpdateAfterDeActivateSDNCResource *****", isDebug) - } - - public void postDeactivateSDNCCall(DelegateExecution execution) { - def isDebugEnabled = execution.getVariable("isDebugLogEnabled") - utils.log("INFO"," ***** started postDeactivateSDNCCall *****", isDebugEnabled) - } - - public void sendSyncResponse(DelegateExecution execution) { - def isDebugEnabled = execution.getVariable("isDebugLogEnabled") - utils.log("INFO"," ***** started sendSyncResponse *****", isDebugEnabled) - - try { - String operationStatus = "finished" - // RESTResponse for main flow - String resourceOperationResp = """{"operationStatus":"${operationStatus}"}""".trim() - utils.log("DEBUG", " sendSyncResponse to APIH:" + "\n" + resourceOperationResp, isDebugEnabled) - sendWorkflowResponse(execution, 202, resourceOperationResp) - execution.setVariable("sentSyncResponse", true) - - } catch (Exception ex) { - String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage() - utils.log("DEBUG", msg, isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) - } - utils.log("DEBUG"," ***** Exit sendSyncResopnse *****", isDebugEnabled) - } - -} \ No newline at end of file diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy new file mode 100644 index 0000000000..52249f0300 --- /dev/null +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy @@ -0,0 +1,89 @@ +/*- + * ============LICENSE_START======================================================= + * OPENECOMP - SO + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.mso.bpmn.infrastructure.scripts + +import org.apache.commons.lang3.StringUtils +import org.camunda.bpm.engine.delegate.BpmnError +import org.json.JSONObject +import org.json.XML +import org.openecomp.mso.bpmn.common.recipe.ResourceInput +import org.openecomp.mso.bpmn.common.resource.ResourceRequestBuilder +import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor +import org.camunda.bpm.engine.delegate.DelegateExecution +import org.openecomp.mso.bpmn.core.json.JsonUtils +import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil +import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils + +/** + * This groovy class supports the ActivateSDNCCNetworkResource.bpmn process. + * flow for SDNC Network Resource Activate + */ +public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor { + + String Prefix = "ACTSDNCRES_" + + ExceptionUtil exceptionUtil = new ExceptionUtil() + + JsonUtils jsonUtil = new JsonUtils() + + SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils() + + public void preProcessRequest(DelegateExecution execution) { + def isDebugEnabled = execution.getVariable("isDebugLogEnabled") + utils.log("INFO"," ***** started preProcessRequest*****", isDebug) + } + + public void prepareSDNCRequest(DelegateExecution execution) { + def isDebugEnabled = execution.getVariable("isDebugLogEnabled") + utils.log("INFO"," ***** started prepareSDNCRequest *****", isDebug) + } + + public void prepareUpdateAfterDeActivateSDNCResource(DelegateExecution execution) { + def isDebugEnabled = execution.getVariable("isDebugLogEnabled") + utils.log("INFO"," ***** started prepareUpdateAfterDeActivateSDNCResource *****", isDebug) + } + + public void postDeactivateSDNCCall(DelegateExecution execution) { + def isDebugEnabled = execution.getVariable("isDebugLogEnabled") + utils.log("INFO"," ***** started postDeactivateSDNCCall *****", isDebugEnabled) + } + + public void sendSyncResponse(DelegateExecution execution) { + def isDebugEnabled = execution.getVariable("isDebugLogEnabled") + utils.log("INFO"," ***** started sendSyncResponse *****", isDebugEnabled) + + try { + String operationStatus = "finished" + // RESTResponse for main flow + String resourceOperationResp = """{"operationStatus":"${operationStatus}"}""".trim() + utils.log("DEBUG", " sendSyncResponse to APIH:" + "\n" + resourceOperationResp, isDebugEnabled) + sendWorkflowResponse(execution, 202, resourceOperationResp) + execution.setVariable("sentSyncResponse", true) + + } catch (Exception ex) { + String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage() + utils.log("DEBUG", msg, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) + } + utils.log("DEBUG"," ***** Exit sendSyncResopnse *****", isDebugEnabled) + } + +} \ No newline at end of file diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DeActivateNetworkResource.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DeActivateNetworkResource.bpmn deleted file mode 100644 index 3442d68c45..0000000000 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DeActivateNetworkResource.bpmn +++ /dev/null @@ -1,177 +0,0 @@ - - - - - SequenceFlow_1qo2pln - - - - - SequenceFlow_18l3crb - SequenceFlow_0khtova - import org.openecomp.mso.bpmn.infrastructure.scripts.* -def dcsi = new DeActivateSDNCNetworkResource() -dcsi.prepareSDNCRequest(execution) - - - SequenceFlow_15wux6a - - - - - - - - - - - - - SequenceFlow_0khtova - SequenceFlow_0uig0sx - - - - SequenceFlow_0x5f1o7 - SequenceFlow_0ow44q0 - import org.openecomp.mso.bpmn.infrastructure.scripts.* -def dcsi = new DeActivateSDNCNetworkResource() -dcsi.postDeactivateSDNCCall(execution) - - - - SequenceFlow_1qo2pln - SequenceFlow_18l3crb - import org.openecomp.mso.bpmn.infrastructure.scripts.* -def dcsi = new DeleteSDNDeActivateSDNCNetworkResourceCNetworkResource() -dcsi.preProcessRequest(execution) - - - - SequenceFlow_0uig0sx - SequenceFlow_1mz0vdx - import org.openecomp.mso.bpmn.infrastructure.scripts.* -def dcsi = new DeActivateSDNCNetworkResource() -dcsi.prepareUpdateAfterDeActivateSDNCResource(execution) - - - - - - ${CVFMI_dbAdapterEndpoint} - - - application/soap+xml - Basic QlBFTENsaWVudDpwYXNzd29yZDEk - - - ${CVFMI_updateResOperStatusRequest} - POST - ${statusCode} - ${response} - - http-connector - - - SequenceFlow_1mz0vdx - SequenceFlow_0x5f1o7 - - - SequenceFlow_0ow44q0 - SequenceFlow_15wux6a - import org.openecomp.mso.bpmn.infrastructure.scripts.* -def csi = new DeActivateSDNCNetworkResource() -csi.sendSyncResponse(execution) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DeActivateSDNCNetworkResource.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DeActivateSDNCNetworkResource.bpmn new file mode 100644 index 0000000000..3442d68c45 --- /dev/null +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DeActivateSDNCNetworkResource.bpmn @@ -0,0 +1,177 @@ + + + + + SequenceFlow_1qo2pln + + + + + SequenceFlow_18l3crb + SequenceFlow_0khtova + import org.openecomp.mso.bpmn.infrastructure.scripts.* +def dcsi = new DeActivateSDNCNetworkResource() +dcsi.prepareSDNCRequest(execution) + + + SequenceFlow_15wux6a + + + + + + + + + + + + + SequenceFlow_0khtova + SequenceFlow_0uig0sx + + + + SequenceFlow_0x5f1o7 + SequenceFlow_0ow44q0 + import org.openecomp.mso.bpmn.infrastructure.scripts.* +def dcsi = new DeActivateSDNCNetworkResource() +dcsi.postDeactivateSDNCCall(execution) + + + + SequenceFlow_1qo2pln + SequenceFlow_18l3crb + import org.openecomp.mso.bpmn.infrastructure.scripts.* +def dcsi = new DeleteSDNDeActivateSDNCNetworkResourceCNetworkResource() +dcsi.preProcessRequest(execution) + + + + SequenceFlow_0uig0sx + SequenceFlow_1mz0vdx + import org.openecomp.mso.bpmn.infrastructure.scripts.* +def dcsi = new DeActivateSDNCNetworkResource() +dcsi.prepareUpdateAfterDeActivateSDNCResource(execution) + + + + + + ${CVFMI_dbAdapterEndpoint} + + + application/soap+xml + Basic QlBFTENsaWVudDpwYXNzd29yZDEk + + + ${CVFMI_updateResOperStatusRequest} + POST + ${statusCode} + ${response} + + http-connector + + + SequenceFlow_1mz0vdx + SequenceFlow_0x5f1o7 + + + SequenceFlow_0ow44q0 + SequenceFlow_15wux6a + import org.openecomp.mso.bpmn.infrastructure.scripts.* +def csi = new DeActivateSDNCNetworkResource() +csi.sendSyncResponse(execution) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit 1.2.3-korg