aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/BaseTask.java
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/BaseTask.java')
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/BaseTask.java25
1 files changed, 10 insertions, 15 deletions
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/BaseTask.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/BaseTask.java
index 5b43c3fc07..dea2fa7c5e 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/BaseTask.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/BaseTask.java
@@ -20,9 +20,6 @@
package org.openecomp.mso.bpmn.core;
-import java.util.Objects;
-
-import org.camunda.bpm.engine.ProcessEngineException;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.Expression;
import org.camunda.bpm.engine.delegate.JavaDelegate;
@@ -30,7 +27,7 @@ import org.camunda.bpm.engine.delegate.JavaDelegate;
/**
* Base class for service tasks.
*/
-public abstract class BaseTask implements JavaDelegate {
+public class BaseTask implements JavaDelegate {
/**
* Get the value of a required field. This method throws
@@ -188,7 +185,13 @@ public abstract class BaseTask implements JavaDelegate {
protected String getOptionalStringField(Expression expression,
DelegateExecution execution, String fieldName) {
Object o = getFieldImpl(expression, execution, fieldName, true);
- return Objects.toString(o, null);
+ if (o instanceof String) {
+ return (String) o;
+ } else if (o == null) {
+ return null;
+ } else {
+ return o.toString();
+ }
}
/**
@@ -524,14 +527,6 @@ public abstract class BaseTask implements JavaDelegate {
return getClass().getSimpleName();
}
-
- /**
- * Check if shouldFail variable is set to true.
- * @param execution
- * @return
- */
- protected boolean shouldFail(DelegateExecution execution) {
- Boolean shouldFail = (Boolean) execution.getVariable("shouldFail");
- return shouldFail != null && shouldFail;
- }
+ @Override
+ public void execute(DelegateExecution execution) throws Exception { }
}