aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCoreBPMN
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/MSOCoreBPMN')
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/WorkflowException.java27
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/RollbackData.java2
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/xml/XmlToolTest.java2
3 files changed, 28 insertions, 3 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 + "]";
}
}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/RollbackData.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/RollbackData.java
index 633736a25a..11b717c0d2 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/RollbackData.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/RollbackData.java
@@ -29,7 +29,7 @@ public class RollbackData implements Serializable {
private static final long serialVersionUID = -4811571658272937718L;
private String requestId;
- private Map<String, String> additionalData = new HashMap<String, String>();
+ private Map<String, String> additionalData = new HashMap<>();
public String getRequestId() {
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/xml/XmlToolTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/xml/XmlToolTest.java
index d099cbebcc..b6bccdb5c9 100644
--- a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/xml/XmlToolTest.java
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/xml/XmlToolTest.java
@@ -28,7 +28,7 @@ public class XmlToolTest {
private String encodeResponseNamespace =
"<Response xmlns:ns2=\"http://ecomp.att.com/mso/request/types/v1\">good</Response>";
private String attribute = "<Response>good&\"bad\"</Response>";
- private String updatedAttribute = "&lt;Response&gt;good&amp;&quot;bad&quot;&lt;/Response&gt;";
+ // private String updatedAttribute = "&lt;Response&gt;good&amp;&quot;bad&quot;&lt;/Response&gt;";
private String content = "<dummy><configuration-event>" + "<event-type>test</event-type>"
+ "<event-correlator-type>test</event-correlator-type>" + "<event-correlator>123</event-correlator>"