import java.util.UUID;
import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution
+import org.camunda.bpm.engine.delegate.DelegateExecution
import org.apache.commons.lang3.*
import org.apache.commons.codec.binary.Base64;
import org.springframework.web.util.UriUtils
NetworkUtils networkUtils = new NetworkUtils()
SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
- public InitializeProcessVariables(Execution execution){
+ public InitializeProcessVariables(DelegateExecution execution){
/* Initialize all the process variables in this block */
execution.setVariable(Prefix + "networkRequest", "")
// Pre or Prepare Request Section
// **************************************************
- public void preProcessRequest (Execution execution) {
+ public void preProcessRequest (DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
execution.setVariable("prefix",Prefix)
}
- public void callRESTQueryAAI (Execution execution) {
+ public void callRESTQueryAAI (DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
execution.setVariable("prefix",Prefix)
String aai_endpoint = execution.getVariable("URN_aai_endpoint")
AaiUtil aaiUriUtil = new AaiUtil(this)
String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
- String queryAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId + "?depth=1"
+ String queryAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId + "?depth=all"
utils.logAudit(queryAAIRequest)
execution.setVariable(Prefix + "queryAAIRequest", queryAAIRequest)
utils.log("DEBUG", Prefix + "AAIRequest - " + "\n" + queryAAIRequest, isDebugEnabled)
NetworkUtils networkUtils = new NetworkUtils()
isVfRelationshipExist = networkUtils.isVfRelationshipExist(aaiResponseAsString)
execution.setVariable(Prefix + "isVfRelationshipExist", isVfRelationshipExist)
- if (isVfRelationshipExist == true) {
+ if (isVfRelationshipExist) {
String relationshipMessage = "AAI Query Success Response but 'vf-module' relationship exist, not allowed to delete: network Id: " + networkId
exceptionUtil.buildWorkflowException(execution, 2500, relationshipMessage)
}
- public void callRESTQueryAAICloudRegion (Execution execution) {
+ public void callRESTQueryAAICloudRegion (DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
execution.setVariable("prefix", Prefix)
}
- public void prepareNetworkRequest (Execution execution) {
+ public void prepareNetworkRequest (DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
execution.setVariable("prefix", Prefix)
* This method is used instead of an HTTP Connector task because the
* connector does not allow DELETE with a body.
*/
- public void sendRequestToVnfAdapter(Execution execution) {
+ public void sendRequestToVnfAdapter(DelegateExecution execution) {
def method = getClass().getSimpleName() + '.sendRequestToVnfAdapter(' +
'execution=' + execution.getId() +
')'
}
- public void prepareSDNCRequest (Execution execution) {
+ public void prepareSDNCRequest (DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
execution.setVariable("prefix", Prefix)
}
- public void prepareRpcSDNCRequest (Execution execution) {
+ public void prepareRpcSDNCRequest (DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
execution.setVariable("prefix", Prefix)
}
- public void prepareRpcSDNCDeactivate(Execution execution) {
+ public void prepareRpcSDNCDeactivate(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
execution.setVariable("prefix",Prefix)
// Post or Validate Response Section
// **************************************************
- public void validateNetworkResponse (Execution execution) {
+ public void validateNetworkResponse (DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
execution.setVariable("prefix", Prefix)
}
- public void validateSDNCResponse (Execution execution) {
+ public void validateSDNCResponse (DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
execution.setVariable("prefix", Prefix)
}
- public void validateRpcSDNCDeactivateResponse (Execution execution) {
+ public void validateRpcSDNCDeactivateResponse (DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
execution.setVariable("prefix",Prefix)
}
- public void prepareRpcSDNCDeactivateRollback(Execution execution) {
+ public void prepareRpcSDNCDeactivateRollback(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
execution.setVariable("prefix",Prefix)
}
- public void prepareRollbackData(Execution execution) {
+ public void prepareRollbackData(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
execution.setVariable("prefix",Prefix)
}
- public void postProcessResponse (Execution execution) {
+ public void postProcessResponse (DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
execution.setVariable("prefix", Prefix)
}
- public void prepareSuccessRollbackData(Execution execution) {
+ public void prepareSuccessRollbackData(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
execution.setVariable("prefix",Prefix)
}
- public void prepareRpcSDNCUnassignRollback(Execution execution) {
+ public void prepareRpcSDNCUnassignRollback(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
execution.setVariable("prefix",Prefix)
}
- public void prepareSDNCRollback (Execution execution) {
+ public void prepareSDNCRollback (DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
execution.setVariable("prefix", Prefix)
}
- public void setExceptionFlag(Execution execution){
+ public void setExceptionFlag(DelegateExecution execution){
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
execution.setVariable("prefix",Prefix)
// Build Error Section
// *******************************
- public void processJavaException(Execution execution){
+ public void processJavaException(DelegateExecution execution){
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
execution.setVariable("prefix",Prefix)
try{