Merge "Adding Junit"
[so.git] / bpmn / MSOCommonBPMN / src / main / groovy / org / openecomp / mso / bpmn / common / scripts / ReceiveWorkflowMessage.groovy
index 6ad03ab..1e1afb4 100644 (file)
@@ -1,10 +1,10 @@
-package org.openecomp.mso.bpmn.common.scripts\r
+package org.openecomp.mso.bpmn.common.scripts;\r
 \r
 import groovy.json.*\r
 \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.bpmn.common.scripts.AbstractServiceTaskProcessor\r
 import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil\r
 \r
@@ -18,7 +18,7 @@ class ReceiveWorkflowMessage extends AbstractServiceTaskProcessor {
         *\r
         * @param execution The flow's execution instance.\r
         */\r
-public void preProcessRequest (Execution execution) {\r
+public void preProcessRequest (DelegateExecution execution) {\r
                def method = getClass().getSimpleName() + '.preProcessRequest(' +\r
                        'execution=' + execution.getId() +\r
                        ')'\r
@@ -30,7 +30,7 @@ public void preProcessRequest (Execution execution) {
                setSuccessIndicator(execution, false)\r
 \r
                try {\r
-                       \r
+\r
                        // Confirm that timeout value has been provided in 'RCVWFMSG_timeout'.\r
                        def timeout = execution.getVariable('RCVWFMSG_timeout')\r
                        logDebug('Timeout value is \'' + timeout + '\'', isDebugLogEnabled)\r
@@ -40,7 +40,7 @@ public void preProcessRequest (Execution execution) {
                                logError(msg)\r
                                exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)\r
                        }\r
-                       \r
+\r
                        // Confirm that message type has been provided in 'RCVWFMSG_messageType'\r
                        def messageType = execution.getVariable('RCVWFMSG_messageType')\r
                        logDebug('Message type is \'' + messageType + '\'', isDebugLogEnabled)\r
@@ -50,7 +50,7 @@ public void preProcessRequest (Execution execution) {
                                logError(msg)\r
                                exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)\r
                        }\r
-                       \r
+\r
                        // Confirm that correlator value has been provided in 'RCVWFMSG_correlator'\r
                        def correlator = execution.getVariable('RCVWFMSG_correlator')\r
                        logDebug('Correlator value is \'' + correlator + '\'', isDebugLogEnabled)\r
@@ -61,7 +61,7 @@ public void preProcessRequest (Execution execution) {
                                exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)\r
                        }\r
                        execution.setVariable(messageType + '_CORRELATOR', correlator)\r
-                       \r
+\r
                        logDebug('Exited ' + method, isDebugLogEnabled)\r
                } catch (BpmnError e) {\r
                        throw e\r
@@ -78,7 +78,7 @@ public void preProcessRequest (Execution execution) {
         *\r
         * @param execution The flow's execution instance.\r
         */\r
-       public void processReceivedMessage(Execution execution){\r
+       public void processReceivedMessage(DelegateExecution execution){\r
                def method = getClass().getSimpleName() + '.processReceivedMessage(' +\r
                        'execution=' + execution.getId() +\r
                        ')'\r
@@ -95,7 +95,7 @@ public void preProcessRequest (Execution execution) {
 \r
                        // The received message is made available to the calling flow in WorkflowResponse\r
                        execution.setVariable("WorkflowResponse", receivedMessage)\r
-                       \r
+\r
                        setSuccessIndicator(execution, true)\r
 \r
                        logDebug('Exited ' + method, isDebugLogEnabled)\r