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/ResponseBuilder.java9
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/AllottedResource.java17
2 files changed, 13 insertions, 13 deletions
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/ResponseBuilder.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/ResponseBuilder.java
index a3f5253765..6f8d34e760 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/ResponseBuilder.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/ResponseBuilder.java
@@ -40,6 +40,7 @@ import org.slf4j.LoggerFactory;
*/
public class ResponseBuilder implements java.io.Serializable {
private static final long serialVersionUID = 1L;
+ private static final String WORKFLOWEXCEPTION = "WorkflowException";
private static final Logger logger = LoggerFactory.getLogger(ResponseBuilder.class);
/**
@@ -61,7 +62,7 @@ public class ResponseBuilder implements java.io.Serializable {
logger.debug("processKey=" + processKey);
// See if there"s already a WorkflowException object in the execution.
- WorkflowException theException = (WorkflowException) execution.getVariable("WorkflowException");
+ WorkflowException theException = (WorkflowException) execution.getVariable(WORKFLOWEXCEPTION);
if (theException != null) {
logger.debug("Exited " + method + " - propagated " + theException);
@@ -138,7 +139,7 @@ public class ResponseBuilder implements java.io.Serializable {
// Create a new WorkflowException object
theException = new WorkflowException(processKey, intResponseCode, errorResponse);
- execution.setVariable("WorkflowException", theException);
+ execution.setVariable(WORKFLOWEXCEPTION, theException);
logger.debug("Exited " + method + " - created " + theException);
return theException;
}
@@ -163,7 +164,7 @@ public class ResponseBuilder implements java.io.Serializable {
Object theResponse = null;
- WorkflowException theException = (WorkflowException) execution.getVariable("WorkflowException");
+ WorkflowException theException = (WorkflowException) execution.getVariable(WORKFLOWEXCEPTION);
String errorResponse = trimString(execution.getVariable(prefix + "ErrorResponse"), null);
String responseCode = trimString(execution.getVariable(prefix + "ResponseCode"), null);
@@ -222,7 +223,7 @@ public class ResponseBuilder implements java.io.Serializable {
}
String s = String.valueOf(object).trim();
- return s.equals("") ? emptyStringValue : s;
+ return "".equals(s) ? emptyStringValue : s;
}
/**
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/AllottedResource.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/AllottedResource.java
index 841eaee675..c37b77d332 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/AllottedResource.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/AllottedResource.java
@@ -22,7 +22,6 @@ package org.onap.so.bpmn.core.domain;
import java.util.UUID;
import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonRootName;
/**
@@ -35,14 +34,6 @@ public class AllottedResource extends Resource {
private static final long serialVersionUID = 1L;
/*
- * set resourceType for this object
- */
- public AllottedResource() {
- resourceType = ResourceType.ALLOTTED_RESOURCE;
- setResourceId(UUID.randomUUID().toString());
- }
-
- /*
* fields specific to Allotted Resource resource type
*/
private String allottedResourceType;
@@ -60,6 +51,14 @@ public class AllottedResource extends Resource {
private String resourceInput;
/*
+ * set resourceType for this object
+ */
+ public AllottedResource() {
+ resourceType = ResourceType.ALLOTTED_RESOURCE;
+ setResourceId(UUID.randomUUID().toString());
+ }
+
+ /*
* GET and SET
*/
public String getAllottedResourceType() {