\r
import org.apache.commons.lang3.*\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.openecomp.mso.rest.APIResponse\r
import org.openecomp.mso.rest.RESTClient\r
import org.openecomp.mso.rest.RESTConfig\r
ExceptionUtil exceptionUtil = new ExceptionUtil()\r
\r
// VNF Response Processing\r
- public void preProcessRequest (Execution execution) {\r
+ public void preProcessRequest (DelegateExecution execution) {\r
def method = getClass().getSimpleName() + '.preProcessRequest(' +\r
'execution=' + execution.getId() +\r
')'\r
\r
String messageId = getChildText(root, 'messageId')\r
\r
+ if ('rollbackVolumeGroupRequest'.equals(requestType)) {\r
+ messageId = getMessageIdForVolumeGroupRollback(root)\r
+ }\r
+ \r
if (messageId == null || messageId.isEmpty()) {\r
String msg = getProcessKey(execution) + ': no messageId in ' + requestType\r
logError(msg)\r
vnfAdapterUrl = vnfAdapterEndpoint + '/volume-groups/' + URLEncoder.encode(volumeGroupId, 'UTF-8')\r
\r
} else if ('rollbackVolumeGroupRequest'.equals(requestType)) {\r
- String volumeGroupId = getChildText(root, 'volumeGroupId')\r
+ String volumeGroupId = root.'volumeGroupRollback'.'volumeGroupId'.text()\r
\r
if (volumeGroupId == null || volumeGroupId.isEmpty()) {\r
String msg = getProcessKey(execution) + ': no volumeGroupId in ' + requestType\r
}\r
}\r
\r
+ public String getMessageIdForVolumeGroupRollback(Node root) {\r
+ return root.'volumeGroupRollback'.'messageId'.text()\r
+ }\r
+ \r
/**\r
* This method is used instead of an HTTP Connector task because the\r
* connector does not allow DELETE with a body.\r
*/\r
- public void sendRequestToVnfAdapter(Execution execution) {\r
+ public void sendRequestToVnfAdapter(DelegateExecution execution) {\r
def method = getClass().getSimpleName() + '.sendRequestToVnfAdapter(' +\r
'execution=' + execution.getId() +\r
')'\r
}\r
}\r
\r
- public void processCallback(Execution execution){\r
+ public void processCallback(DelegateExecution execution){\r
def method = getClass().getSimpleName() + '.processCallback(' +\r
'execution=' + execution.getId() +\r
')'\r
* a WorkflowException. If the response cannot be parsed, a more generic\r
* WorkflowException is created.\r
*/\r
- public void vnfAdapterWorkflowException(Execution execution, Object response) {\r
+ public void vnfAdapterWorkflowException(DelegateExecution execution, Object response) {\r
try {\r
Node root = new XmlParser().parseText(response)\r
String category = getChildText(root, "category")\r