summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@att.com>2019-07-31 11:03:06 -0400
committerBenjamin, Max (mb388a) <mb388a@att.com>2019-07-31 11:04:21 -0400
commit4a2ac263b3a8a0f4116f659f8c02fe255bdc41aa (patch)
treef639bc6c3725bc837384c72b7e39c5e5b843efc2 /bpmn/MSOCommonBPMN/src/main
parent47fb69ff7908ae75777a4f0c7e28c198f0e117ae (diff)
added back missing method in groovy file
Need to bring back AbstractTaskProcessor.logWorkflowException() method because this is being called from a number of groovy files. Issue-ID: SO-2172 Change-Id: Id5dee85fcb48265955dde3d74f7c0f98300410f0 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AbstractServiceTaskProcessor.groovy14
1 files changed, 14 insertions, 0 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AbstractServiceTaskProcessor.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AbstractServiceTaskProcessor.groovy
index 4670b11b71..976ad1466d 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AbstractServiceTaskProcessor.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AbstractServiceTaskProcessor.groovy
@@ -45,6 +45,20 @@ public abstract class AbstractServiceTaskProcessor implements ServiceTaskProcess
public MsoUtils utils = new MsoUtils()
/**
+ * Logs a WorkflowException at the ERROR level with the specified message.
+ * @param execution the execution
+ */
+ public void logWorkflowException(DelegateExecution execution, String message) {
+ def workflowException = execution.getVariable("WorkflowException")
+
+ if (workflowException == null) {
+ logger.error(message);
+ } else {
+ logger.error('{}: {}', message, workflowException)
+ }
+ }
+
+ /**
* Saves the WorkflowException in the execution to the specified variable,
* clearing the WorkflowException variable so the workflow can continue
* processing (perhaps catching another WorkflowException).