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.DelegateExecution
import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.bpmn.core.domain.*
import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.core.UrnPropertiesReader
import org.onap.so.logger.MessageEnum
import org.onap.so.logger.MsoLogger
import org.springframework.web.util.UriUtils;
* This method is executed during the preProcessRequest task of the <class>CreateServiceInstance.bpmn</class> process.
* @param execution
*/
- public InitializeProcessVariables(DelegateExecution execution) {
+ private InitializeProcessVariables(DelegateExecution execution) {
/* Initialize all the process variables in this block */
execution.setVariable("createVcpeServiceRequest", "")
InitializeProcessVariables(execution)
//Config Inputs
- String aaiDistDelay = execution.getVariable('URN_mso_workflow_aai_distribution_delay')
+ String aaiDistDelay = UrnPropertiesReader.getVariable("aai.workflowAaiDistributionDelay")
if (isBlank(aaiDistDelay)) {
- msg = "URN_mso_workflow_aai_distribution_delay is null"
+ String msg = "workflowAaiDistributionDelay is null"
msoLogger.debug(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
}
* Extracting User Parameters from incoming Request and converting into a Map
*/
def jsonSlurper = new JsonSlurper()
- def jsonOutput = new JsonOutput()
Map reqMap = jsonSlurper.parseText(createVcpeServiceRequest)
}
public void sendSyncResponse(DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable(DebugFlag)
msoLogger.trace("Inside sendSyncResponse of CreateVcpeResCustService ")
//
// *******************************
public void prepareDecomposeService(DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable(DebugFlag)
try {
msoLogger.trace("Inside prepareDecomposeService of CreateVcpeResCustService ")
//
// *******************************
public void prepareCreateServiceInstance(DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable(DebugFlag)
try {
msoLogger.trace("Inside prepareCreateServiceInstance of CreateVcpeResCustService ")
public void postProcessServiceInstanceCreate(DelegateExecution execution) {
def method = getClass().getSimpleName() + '.postProcessServiceInstanceCreate(' + 'execution=' + execution.getId() + ')'
- def isDebugLogEnabled = execution.getVariable(DebugFlag)
msoLogger.trace('Entered ' + method)
String requestId = execution.getVariable("mso-request-id")
public void processDecomposition(DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable(DebugFlag)
msoLogger.trace("Inside processDecomposition() of CreateVcpeResCustService ")
public void prepareCreateAllottedResourceTXC(DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable(DebugFlag)
try {
msoLogger.trace("Inside prepareCreateAllottedResourceTXC of CreateVcpeResCustService ")
* ModelInfo modelInfo = serviceDecomposition.getModelInfo()
*
*/
- String createVcpeServiceRequest = execution.getVariable("createVcpeServiceRequest")
ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
//allottedResourceModelInfo
}
public void prepareCreateAllottedResourceBRG(DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable(DebugFlag)
try {
msoLogger.trace("Inside prepareCreateAllottedResourceBRG of CreateVcpeResCustService ")
* ModelInfo modelInfo = serviceDecomposition.getModelInfo()
*
*/
- String createVcpeServiceRequest = execution.getVariable("createVcpeServiceRequest")
ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
//allottedResourceModelInfo
// Generate Network request Section
// *******************************
public void prepareVnfAndModulesCreate(DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable(DebugFlag)
try {
msoLogger.trace("Inside prepareVnfAndModulesCreate of CreateVcpeResCustService ")
// Validate Vnf request Section -> increment count
// *******************************
public void validateVnfCreate(DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable(DebugFlag)
try {
msoLogger.trace("Inside validateVnfCreate of CreateVcpeResCustService ")
// Prepare Completion request Section
// *****************************************
public void postProcessResponse(DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable(DebugFlag)
msoLogger.trace("Inside postProcessResponse of CreateVcpeResCustService ")
}
public void preProcessRollback(DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable(DebugFlag)
msoLogger.trace("preProcessRollback of CreateVcpeResCustService ")
try {
}
public void postProcessRollback(DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable(DebugFlag)
msoLogger.trace("postProcessRollback of CreateVcpeResCustService ")
String msg = ""
try {
}
public void prepareFalloutRequest(DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable(DebugFlag)
msoLogger.trace("STARTED CreateVcpeResCustService prepareFalloutRequest Process ")
public void sendSyncError(DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable(DebugFlag)
execution.setVariable("prefix", Prefix)
msoLogger.trace("Inside sendSyncError() of CreateVcpeResCustService ")
}
public void processJavaException(DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable(DebugFlag)
execution.setVariable("prefix", Prefix)
try {
msoLogger.debug("Caught a Java Exception")