summaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-08-26 13:58:32 +0000
committerGerrit Code Review <gerrit@onap.org>2019-08-26 13:58:32 +0000
commit997fc06d9a2fce3038bd89dd050acc5e9b67be71 (patch)
tree6d7a0306795fcea0328afa2bc12a7b18393854ea /bpmn
parent713cca3e723ad3a7fa79228280290bad0689888e (diff)
parent4efbb108a4c4668bf1c08018123e77fb32117051 (diff)
Merge "added in exception handling if auditResult is null"
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");
}
}