import java.util.UUID;\r
\r
import org.camunda.bpm.engine.delegate.BpmnError \r
-import org.camunda.bpm.engine.runtime.Execution\r
+import org.camunda.bpm.engine.delegate.DelegateExecution\r
import org.apache.commons.lang3.*\r
import org.apache.commons.codec.binary.Base64;\r
import org.springframework.web.util.UriUtils \r
public class CreateVFCNSResource extends AbstractServiceTaskProcessor {\r
\r
String vfcUrl = "/vfc/rest/v1/vfcadapter"\r
- \r
+ \r
String host = "http://mso.mso.testlab.openecomp.org:8080"\r
\r
ExceptionUtil exceptionUtil = new ExceptionUtil()\r
\r
JsonUtils jsonUtil = new JsonUtils()\r
- \r
- /**CreateVFCNSResource\r
+\r
+ /**\r
+ * CreateVFCNSResource\r
* Pre Process the BPMN Flow Request\r
* Inclouds:\r
* generate the nsOperationKey\r
* generate the nsParameters\r
*/\r
- public void preProcessRequest (Execution execution) {\r
+ public void preProcessRequest (DelegateExecution execution) {\r
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")\r
String msg = ""\r
utils.log("INFO", " *** preProcessRequest() *** ", isDebugEnabled)\r
/**\r
* create NS task\r
*/\r
- public void createNetworkService(Execution execution) {\r
+ public void createNetworkService(DelegateExecution execution) {\r
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")\r
utils.log("INFO"," ***** createNetworkService *****", isDebugEnabled)\r
String nsOperationKey = execution.getVariable("nsOperationKey");\r
/**\r
* instantiate NS task\r
*/\r
- public void instantiateNetworkService(Execution execution) {\r
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")\r
+ public void instantiateNetworkService(DelegateExecution execution) {\r
+ def isDebugEnabled= execution.getVariable("isDebugLogEnabled")\r
utils.log("INFO"," ***** instantiateNetworkService *****", isDebugEnabled)\r
String nsOperationKey = execution.getVariable("nsOperationKey");\r
String nsParameters = execution.getVariable("nsParameters");\r
/**\r
* query NS task\r
*/\r
- public void queryNSProgress(Execution execution) {\r
+ public void queryNSProgress(DelegateExecution execution) {\r
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")\r
utils.log("INFO"," ***** queryNSProgress *****", isDebugEnabled)\r
String jobId = execution.getVariable("jobId")\r
/**\r
* delay 5 sec \r
*/\r
- public void timeDelay(Execution execution) {\r
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")\r
+ public void timeDelay(DelegateExecution execution) {\r
+ def isDebugEnabled= execution.getVariable("isDebugLogEnabled")\r
try {\r
Thread.sleep(5000);\r
} catch(InterruptedException e) { \r
/**\r
* finish NS task\r
*/\r
- public void addNSRelationship(Execution execution) {\r
+ public void addNSRelationship(DelegateExecution execution) {\r
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")\r
utils.log("INFO"," ***** addNSRelationship *****", isDebugEnabled)\r
String nsInstanceId = execution.getVariable("nsInstanceId")\r
utils.log("INFO"," *****Exit addNSRelationship *****", isDebugEnabled)\r
}\r
\r
- public APIResponse executeAAIPutCall(Execution execution, String url, String payload){\r
+ public APIResponse executeAAIPutCall(DelegateExecution execution, String url, String payload){\r
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")\r
utils.log("INFO", " ======== Started Execute AAI Put Process ======== ", isDebugEnabled) \r
APIResponse apiResponse = null\r
}\r
return apiResponse\r
}\r
- \r
+\r
/**\r
* post request\r
* url: the url of the request\r
* requestBody: the body of the request\r
*/\r
- private APIResponse postRequest(Execution execution, String url, String requestBody){\r
+ private APIResponse postRequest(DelegateExecution execution, String url, String requestBody){\r
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")\r
utils.log("INFO"," ***** Started Execute VFC adapter Post Process *****", isDebugEnabled)\r
utils.log("INFO","url:"+url +"\nrequestBody:"+ requestBody, isDebugEnabled)\r