From 1db92d88de7e377d5af5c710b270b383960804b3 Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Thu, 14 Feb 2019 18:10:29 -0500 Subject: always increment gCurrentSequence always increment gCurrentSequence to properly interact with retry and rollback logic Change-Id: I7e99973682f93f891c8d35a4f3699ba17a05bc15 Issue-ID: SO-1509 Signed-off-by: Benjamin, Max (mb388a) --- .../so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java | 2 +- .../bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksTest.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'bpmn') diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java index f6c9597de8..2e91a52f65 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java @@ -89,8 +89,8 @@ public class WorkflowActionBBTasks { execution.setVariable("completed", true); } else { execution.setVariable("completed", false); - execution.setVariable(G_CURRENT_SEQUENCE, currentSequence); } + execution.setVariable(G_CURRENT_SEQUENCE, currentSequence); } public void updateFlowStatistics(DelegateExecution execution) { diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksTest.java index 2fc62978fb..17a37c873a 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksTest.java @@ -96,7 +96,9 @@ public class WorkflowActionBBTasksTest extends BaseTaskTest { execution.setVariable("flowsToExecute", flowsToExecute); workflowActionBBTasks.selectBB(execution); boolean success = (boolean) execution.getVariable("completed"); + int currentSequence = (int) execution.getVariable("gCurrentSequence"); assertEquals(true,success); + assertEquals(1,currentSequence); } @Test @@ -115,7 +117,9 @@ public class WorkflowActionBBTasksTest extends BaseTaskTest { execution.setVariable("flowsToExecute", flowsToExecute); workflowActionBBTasks.selectBB(execution); boolean success = (boolean) execution.getVariable("completed"); + int currentSequence = (int) execution.getVariable("gCurrentSequence"); assertEquals(false,success); + assertEquals(1,currentSequence); } @Test -- cgit 1.2.3-korg