diff options
author | Steve Smokowski <ss835w@att.com> | 2020-01-30 13:47:36 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-01-30 13:47:36 +0000 |
commit | 8862df323bde6ceeb685281a70d22b0dc53b6eb0 (patch) | |
tree | acea0996deb459026156b1ffaf14e6d5282205ee /adapters/so-appc-orchestrator | |
parent | 74a3c19549a12db2e196a6141f6fc2dcda1c5826 (diff) | |
parent | 2eb23f4ac862f700f0abf6f2dc5b9fa662ec9c60 (diff) |
Merge "add manual handling to rainy day handling for bbs"
Diffstat (limited to 'adapters/so-appc-orchestrator')
-rw-r--r-- | adapters/so-appc-orchestrator/src/main/java/org/onap/so/adapters/appc/orchestrator/service/ApplicationControllerTask.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/adapters/so-appc-orchestrator/src/main/java/org/onap/so/adapters/appc/orchestrator/service/ApplicationControllerTask.java b/adapters/so-appc-orchestrator/src/main/java/org/onap/so/adapters/appc/orchestrator/service/ApplicationControllerTask.java index 181d114cc0..db70a6b5cb 100644 --- a/adapters/so-appc-orchestrator/src/main/java/org/onap/so/adapters/appc/orchestrator/service/ApplicationControllerTask.java +++ b/adapters/so-appc-orchestrator/src/main/java/org/onap/so/adapters/appc/orchestrator/service/ApplicationControllerTask.java @@ -4,6 +4,7 @@ import org.camunda.bpm.client.task.ExternalTask; import org.camunda.bpm.client.task.ExternalTaskService; import org.onap.so.adapters.appc.orchestrator.client.ApplicationControllerCallback; import org.onap.so.adapters.appc.orchestrator.client.ApplicationControllerSupport; +import org.onap.so.adapters.appc.orchestrator.client.StatusCategory; import org.onap.so.appc.orchestrator.service.beans.ApplicationControllerTaskRequest; import org.onap.so.externaltasks.logging.AuditMDCSetup; import org.onap.so.utils.ExternalTaskUtils; @@ -42,8 +43,16 @@ public class ApplicationControllerTask extends ExternalTaskUtils { try { status = applicationControllerTaskImpl.execute(msoRequestId, request, listener); + if (status != null && status.getCode() != 0 + && !applicationControllerSupport.getCategoryOf(status).equals(StatusCategory.NORMAL)) { + logger.error("The External Task Id: {} Failed locally with status {}", externalTask.getId(), + status.getMessage()); + externalTaskService.handleBpmnError(externalTask, "MSOWorkflowException", status.getMessage()); + } } catch (Exception e) { - logger.error("Error while calling appc", e.getMessage()); + logger.error("The External Task Id: {} Failed while calling appc with exception", externalTask.getId(), + e.getMessage()); + externalTaskService.handleBpmnError(externalTask, "MSOWorkflowException", e.getMessage()); } } |