aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
authorKalkere Ramesh, Sharan <sharan.kalkere.ramesh@att.com>2019-08-20 09:45:01 -0400
committerBenjamin, Max (mb388a) <mb388a@att.com>2019-08-20 09:45:02 -0400
commit4efbb108a4c4668bf1c08018123e77fb32117051 (patch)
treee7fbe610905386e7b1232a4c65163870501a6b02 /bpmn
parent86bac35dfead00265a18944528b635a16ab96263 (diff)
added in exception handling if auditResult is null
added in exception handling if auditResult is null maven process format the file that is not formatted fix formsatting again because it failed last time Issue-ID: SO-2242 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I6a83c7fe120e02e808470dbc9e7e431e0b62f4f4
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java
index 100887dbbc..729f5c95c4 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java
@@ -244,9 +244,9 @@ public class ExceptionBuilder {
public void processAuditException(DelegateExecutionImpl execution, boolean flowShouldContinue) {
logger.debug("Processing Audit Results");
String auditListString = (String) execution.getVariable("auditInventoryResult");
+ String processKey = getProcessKey(execution.getDelegateExecution());
if (auditListString != null) {
StringBuilder errorMessage = new StringBuilder();
- String processKey = getProcessKey(execution.getDelegateExecution());
try {
ExtractPojosForBB extractPojosForBB = getExtractPojosForBB();
VfModule module = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID);
@@ -302,7 +302,13 @@ public class ExceptionBuilder {
}
} else {
- logger.debug("Unable to process audit results due to auditInventoryResult being null");
+ String errorMessage = "Unable to process audit results due to auditInventoryResult being null";
+ WorkflowException exception = new WorkflowException(processKey, 400, errorMessage, TargetEntity.SO);
+ execution.setVariable("WorkflowException", exception);
+ execution.setVariable("WorkflowExceptionErrorMessage", errorMessage);
+ logger.info("Outgoing WorkflowException is {}", exception);
+ logger.info("Throwing MSOWorkflowException");
+ throw new BpmnError("AAIInventoryFailure");
}
}