diff options
author | Steve Smokowski <ss835w@att.com> | 2019-05-20 14:17:03 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-05-20 14:17:03 +0000 |
commit | 65369ce83578048d8e133e79f6892a42a801be04 (patch) | |
tree | e5c323efa0ce3b8ae0d95432995a38583b03e6c3 /bpmn/MSOCommonBPMN/src/main | |
parent | 1db5881503e5b19ca9caec03068cd54828348aaf (diff) | |
parent | a2da6120817a60ca07e1c5b417a8804b41192040 (diff) |
Merge "Altered bpmn and audit behavior on delete vf mod"
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main')
-rw-r--r-- | bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java | 18 |
1 files changed, 11 insertions, 7 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 b69ab151c4..dabfc81e1f 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 @@ -152,7 +152,7 @@ public class ExceptionBuilder { .getProcessDefinition(execution.getProcessDefinitionId()).getKey(); } - public void processAuditException(DelegateExecutionImpl execution) { + public void processAuditException(DelegateExecutionImpl execution, boolean flowShouldContinue) { logger.info("Building a WorkflowException for Subflow"); StringBuilder errorMessage = new StringBuilder(); @@ -203,11 +203,15 @@ public class ExceptionBuilder { errorMessage.append( "Recommendation - Wait for nightly RO Audit to run and fix the data issue and resume vf-module creation in VID. If problem persists then report problem to AIC/RO Ops."); - WorkflowException exception = new WorkflowException(processKey, 400, errorMessage.toString()); - execution.setVariable("WorkflowException", exception); - execution.setVariable("WorkflowExceptionErrorMessage", errorMessage); - logger.info("Outgoing WorkflowException is {}", exception); - logger.info("Throwing MSOWorkflowException"); - throw new BpmnError("AAIInventoryFailure"); + if (flowShouldContinue) { + execution.setVariable("StatusMessage", errorMessage.toString()); + } else { + WorkflowException exception = new WorkflowException(processKey, 400, errorMessage.toString()); + execution.setVariable("WorkflowException", exception); + execution.setVariable("WorkflowExceptionErrorMessage", errorMessage.toString()); + logger.info("Outgoing WorkflowException is {}", exception); + logger.info("Throwing MSOWorkflowException"); + throw new BpmnError("AAIInventoryFailure"); + } } } |