summaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-infrastructure-common
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common')
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy17
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy41
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy20
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy30
4 files changed, 27 insertions, 81 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy
index c48d000ab3..f640aa74f7 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy
@@ -22,17 +22,15 @@ package org.onap.so.bpmn.infrastructure.scripts
import org.apache.commons.lang3.StringUtils
import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
import org.json.JSONObject
import org.json.XML
import org.onap.so.bpmn.common.recipe.ResourceInput
import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
-import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
-import org.onap.so.logger.MsoLogger
-import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.logger.MsoLogger
/**
@@ -50,9 +48,6 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
- MsoUtils msoUtils = new MsoUtils()
-
-
public void preProcessRequest(DelegateExecution execution) {
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
msoLogger.info(" ***** Started preProcessRequest *****")
@@ -133,7 +128,6 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
}
public void prepareUpdateAfterActivateSDNCResource(DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
msoLogger.info("started prepareUpdateAfterActivateSDNCResource ")
ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
@@ -191,7 +185,6 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
}
public void prepareSDNCRequest (DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
msoLogger.info("Started prepareSDNCRequest ")
try {
@@ -409,7 +402,6 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
}
public void postActivateSDNCCall(DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
msoLogger.info("started postCreateSDNCCall ")
String responseCode = execution.getVariable(Prefix + "sdncCreateReturnCode")
@@ -419,7 +411,6 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
}
public void sendSyncResponse(DelegateExecution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
msoLogger.dubug(" *** sendSyncResponse *** ")
try {
@@ -431,10 +422,10 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
execution.setVariable("sentSyncResponse", true)
} catch (Exception ex) {
- String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage()
+ String msg = "Exception in sendSyncResponse:" + ex.getMessage()
msoLogger.debug( msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
- msoLogger.dubug(" ***** Exit sendSyncResopnse *****")
+ msoLogger.dubug(" ***** Exit sendSyncResponse *****")
}
} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
index 5255b37bb0..7eeeff8546 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
@@ -20,32 +20,21 @@
package org.onap.so.bpmn.infrastructure.scripts
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
import org.json.JSONObject
import org.json.XML
-import org.onap.so.bpmn.infrastructure.pnf.implementation.AaiResponse;
-
-import static org.apache.commons.lang3.StringUtils.*;
-import groovy.xml.XmlUtil
-import groovy.json.*
+import org.onap.so.bpmn.common.recipe.ResourceInput
+import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
+import org.onap.so.bpmn.common.scripts.AaiUtil
import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.common.scripts.ExceptionUtil
-import org.onap.so.bpmn.common.recipe.ResourceInput;
-import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
-import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.bpmn.core.json.JsonUtils
-import org.onap.so.bpmn.infrastructure.workflow.serviceTask.client.builder.AbstractBuilder
+import org.onap.so.logger.MsoLogger
import org.onap.so.rest.APIResponse
-import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
-import org.onap.so.bpmn.common.scripts.MsoUtils
-import org.onap.so.bpmn.common.scripts.AaiUtil
-
-import java.util.UUID;
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.apache.commons.lang3.*
-import org.onap.so.bpmn.common.scripts.MsoUtils
-import org.onap.so.logger.MsoLogger
+import static org.apache.commons.lang3.StringUtils.*
/**
* This groovy class supports the <class>CreateSDNCCNetworkResource.bpmn</class> process.
@@ -60,11 +49,8 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
JsonUtils jsonUtil = new JsonUtils()
- MsoUtils msoUtils = new MsoUtils()
-
public void preProcessRequest(DelegateExecution execution){
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
msoLogger.info(" ***** Started preProcessRequest *****")
try {
@@ -155,8 +141,6 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
execution.setVariable(Prefix + "serviceInstanceId", resourceInputObj.getServiceInstanceId())
execution.setVariable("mso-request-id", requestId)
execution.setVariable("mso-service-instance-id", resourceInputObj.getServiceInstanceId())
- //TODO Here build networkrequest
-
} catch (BpmnError e) {
throw e;
} catch (Exception ex){
@@ -243,12 +227,11 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
/**
* Pre Process the BPMN Flow Request
- * Inclouds:
+ * Includes:
* generate the nsOperationKey
* generate the nsParameters
*/
public void prepareSDNCRequest (DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
msoLogger.info(" ***** Started prepareSDNCRequest *****")
try {
@@ -534,7 +517,6 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
}
public void afterCreateSDNCCall(DelegateExecution execution){
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
msoLogger.info(" ***** Started prepareSDNCRequest *****")
String responseCode = execution.getVariable(Prefix + "sdncCreateReturnCode")
String responseObj = execution.getVariable(Prefix + "SuccessIndicator")
@@ -581,7 +563,6 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
}
public void sendSyncResponse (DelegateExecution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
msoLogger.debug(" *** sendSyncResponse *** ")
try {
@@ -593,10 +574,10 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
execution.setVariable("sentSyncResponse", true)
} catch (Exception ex) {
- String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage()
+ String msg = "Exception in sendSyncResponse:" + ex.getMessage()
msoLogger.debug(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
- msoLogger.debug(" ***** Exit sendSyncResopnse *****")
+ msoLogger.debug(" ***** Exit sendSyncResponse *****")
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy
index b6ea9f3fef..f13141751b 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy
@@ -22,17 +22,13 @@ package org.onap.so.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.onap.so.logger.MsoLogger
+import org.camunda.bpm.engine.delegate.DelegateExecution
import org.onap.so.bpmn.common.recipe.ResourceInput
import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
-import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
-import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.logger.MsoLogger
/**
@@ -49,11 +45,8 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor
SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
- MsoUtils msoUtils = new MsoUtils()
-
public void preProcessRequest(DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
msoLogger.info(" ***** Started preProcessRequest *****")
try {
@@ -125,8 +118,6 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor
execution.setVariable(Prefix + "serviceInstanceId", resourceInputObj.getServiceInstanceId())
execution.setVariable("mso-request-id", requestId)
execution.setVariable("mso-service-instance-id", resourceInputObj.getServiceInstanceId())
- //TODO Here build networkrequest
-
} catch (BpmnError e) {
throw e;
} catch (Exception ex){
@@ -137,7 +128,6 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor
}
public void prepareSDNCRequest(DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
msoLogger.info(" ***** Started prepareSDNCRequest *****")
try {
@@ -383,7 +373,6 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor
}
public void postDeactivateSDNCCall(DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
msoLogger.info(" ***** Started prepareSDNCRequest *****") String responseCode = execution.getVariable(Prefix + "sdncDeleteReturnCode")
String responseObj = execution.getVariable(Prefix + "SuccessIndicator")
@@ -392,7 +381,6 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor
}
public void sendSyncResponse(DelegateExecution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
msoLogger.debug(" *** sendSyncResponse *** ")
try {
@@ -404,11 +392,11 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor
execution.setVariable("sentSyncResponse", true)
} catch (Exception ex) {
- String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage()
+ String msg = "Exception in sendSyncResponse:" + ex.getMessage()
msoLogger.debug(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
- msoLogger("DEBUG"," ***** Exit sendSyncResopnse *****")
+ msoLogger.debug(" ***** Exit sendSyncResponse *****")
}
} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy
index 192788a4ca..3519bd7484 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy
@@ -20,24 +20,18 @@
package org.onap.so.bpmn.infrastructure.scripts
-import org.onap.so.logger.MsoLogger
-
-import static org.apache.commons.lang3.StringUtils.*;
-
import org.apache.commons.lang3.*
-import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.onap.so.bpmn.common.recipe.ResourceInput;
-import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
-import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.recipe.ResourceInput
+import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.common.scripts.ExceptionUtil
-import org.onap.so.bpmn.common.scripts.MsoUtils
import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
import org.onap.so.bpmn.core.json.JsonUtils
-import org.onap.so.bpmn.common.scripts.MsoUtils
import org.onap.so.logger.MsoLogger
-import groovy.json.*
+import static org.apache.commons.lang3.StringUtils.*
/**
* This groovy class supports the <class>DeleteSDNCCNetworkResource.bpmn</class> process.
@@ -54,10 +48,7 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor {
SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
- MsoUtils msoUtils = new MsoUtils()
-
public void preProcessRequest(DelegateExecution execution){
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
msoLogger.info(" ***** Started preProcessRequest *****")
try {
@@ -147,8 +138,6 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor {
execution.setVariable(Prefix + "serviceInstanceId", resourceInputObj.getServiceInstanceId())
execution.setVariable("mso-request-id", requestId)
execution.setVariable("mso-service-instance-id", resourceInputObj.getServiceInstanceId())
- //TODO Here build networkrequest
-
} catch (BpmnError e) {
throw e;
} catch (Exception ex){
@@ -160,12 +149,11 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor {
/**
* Pre Process the BPMN Flow Request
- * Inclouds:
+ * Includes:
* generate the nsOperationKey
* generate the nsParameters
*/
public void prepareSDNCRequest (DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
msoLogger.info(" ***** Started prepareSDNCRequest *****")
try {
@@ -444,7 +432,6 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor {
}
public void postDeleteSDNCCall(DelegateExecution execution){
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
msoLogger.info(" ***** Started prepareSDNCRequest *****")
String responseCode = execution.getVariable(Prefix + "sdncDeleteReturnCode")
String responseObj = execution.getVariable(Prefix + "SuccessIndicator")
@@ -454,7 +441,6 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor {
}
public void sendSyncResponse (DelegateExecution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
msoLogger.debug( " *** sendSyncResponse *** ")
try {
@@ -466,10 +452,10 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor {
execution.setVariable("sentSyncResponse", true)
} catch (Exception ex) {
- String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage()
+ String msg = "Exception in sendSyncResponse:" + ex.getMessage()
msoLogger.debug( msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
- msoLogger.debug(" ***** Exit sendSyncResopnse *****")
+ msoLogger.debug(" ***** Exit sendSyncResponse *****")
}
}