diff options
author | Kuleshov, Elena <evn@att.com> | 2020-01-24 16:33:39 -0500 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@att.com> | 2020-01-24 16:33:40 -0500 |
commit | 2eb23f4ac862f700f0abf6f2dc5b9fa662ec9c60 (patch) | |
tree | 4f4e5ad0aa89961c4b51eaf8fd32bc9f340b8c93 /adapters/so-appc-orchestrator/src | |
parent | 48cb43adc20ac10fa6f22c0e03fe2b6775d45b87 (diff) |
add manual handling to rainy day handling for bbs
Initial Manual Handling addition to Rainy Day BB handling.
Reenable task API, add task variable setup.
TaskTimeout will come from the configuration settings.
Update the base path for the APIH manual tasks junit.
Additional JUNIT tests for manual handling
Add Manual as a primary policy for Change Management BBs.
Error handling changes and robot tests for manual handling.
Correct failure data retrieval when serviceSubscription is unavailable.
Correct failure data retrieval when serviceSubscription is unavailable.
Keep WorkflowException when manual pause gets invoked; improved error
reporting.
Issue-ID: SO-2616
Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com>
Change-Id: I98a84c1a489bb7b24b68e567f604aeb074fd7bf9
Diffstat (limited to 'adapters/so-appc-orchestrator/src')
-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()); } } |