From 6d8a666a16c66f69981dbf9115a864b6a26c9912 Mon Sep 17 00:00:00 2001 From: "Sangalang, Felix" Date: Fri, 17 May 2019 10:16:27 -0400 Subject: END_TIME is not populated by bpmn as expected Removed/Cleaned-up unnecessary lines/codes. Updated junit tests for END_TIME to any(Timestamp.class). END_TIME is not populated by bpmn when rainy day retry or rollback is executed. Change-Id: I614d66ca767629bf43aac8eee981423e5393015e Issue-ID: SO-1887 Signed-off-by: Benjamin, Max (mb388a) --- .../bpmn/infrastructure/workflow/tasks/WorkflowActionBBFailure.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'bpmn/so-bpmn-tasks/src/main/java/org/onap') diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBFailure.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBFailure.java index 4fc4d85b97..5f357f5478 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBFailure.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBFailure.java @@ -20,6 +20,7 @@ package org.onap.so.bpmn.infrastructure.workflow.tasks; +import java.sql.Timestamp; import java.util.Optional; import org.camunda.bpm.engine.delegate.BpmnError; import org.camunda.bpm.engine.delegate.DelegateExecution; @@ -53,6 +54,10 @@ public class WorkflowActionBBFailure { errorMsg = "Failed to determine error message"; } request.setStatusMessage(errorMsg); + request.setProgress(Long.valueOf(100)); + request.setRequestStatus("FAILED"); + request.setLastModifiedBy("CamundaBPMN"); + request.setEndTime(new Timestamp(System.currentTimeMillis())); requestDbclient.updateInfraActiveRequests(request); } catch (Exception e) { logger.error( @@ -113,6 +118,7 @@ public class WorkflowActionBBFailure { request.setProgress(Long.valueOf(100)); request.setRequestStatus("FAILED"); request.setLastModifiedBy("CamundaBPMN"); + request.setEndTime(new Timestamp(System.currentTimeMillis())); requestDbclient.updateInfraActiveRequests(request); } catch (Exception e) { workflowAction.buildAndThrowException(execution, "Error Updating Request Database", e); -- cgit 1.2.3-korg