summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCoreBPMN/src
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/MSOCoreBPMN/src')
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/WorkflowException.java27
1 files changed, 26 insertions, 1 deletions
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/WorkflowException.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/WorkflowException.java
index 1692045d33..7d5bb0dcf1 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/WorkflowException.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/WorkflowException.java
@@ -21,6 +21,7 @@
package org.onap.so.bpmn.core;
import java.io.Serializable;
+import org.onap.so.utils.TargetEntities;
/**
* An object that represents a workflow exception.
@@ -32,6 +33,7 @@ public class WorkflowException implements Serializable {
private final int errorCode;
private final String errorMessage;
private final String workStep;
+ private TargetEntities extSystemErrorSource;
/**
* Constructor
@@ -47,6 +49,15 @@ public class WorkflowException implements Serializable {
workStep = "*";
}
+ public WorkflowException(String processKey, int errorCode, String errorMessage,
+ TargetEntities extSystemErrorSource) {
+ this.processKey = processKey;
+ this.errorCode = errorCode;
+ this.errorMessage = errorMessage;
+ workStep = "*";
+ this.extSystemErrorSource = extSystemErrorSource;
+ }
+
public WorkflowException(String processKey, int errorCode, String errorMessage, String workStep) {
this.processKey = processKey;
this.errorCode = errorCode;
@@ -54,6 +65,15 @@ public class WorkflowException implements Serializable {
this.workStep = workStep;
}
+ public WorkflowException(String processKey, int errorCode, String errorMessage, String workStep,
+ TargetEntities extSystemErrorSource) {
+ this.processKey = processKey;
+ this.errorCode = errorCode;
+ this.errorMessage = errorMessage;
+ this.workStep = workStep;
+ this.extSystemErrorSource = extSystemErrorSource;
+ }
+
/**
* Returns the process key.
*/
@@ -82,12 +102,17 @@ public class WorkflowException implements Serializable {
return workStep;
}
+ public TargetEntities getExtSystemErrorSource() {
+ return extSystemErrorSource;
+ }
+
/**
* Returns a string representation of this object.
*/
@Override
public String toString() {
return getClass().getSimpleName() + "[processKey=" + getProcessKey() + ",errorCode=" + getErrorCode()
- + ",errorMessage=" + getErrorMessage() + ",workStep=" + getWorkStep() + "]";
+ + ",errorMessage=" + getErrorMessage() + ",workStep=" + getWorkStep() + ",extSystemErrorSource="
+ + extSystemErrorSource + "]";
}
}