Skip to content

Commit

Permalink
fix sub workflow tests
Browse files Browse the repository at this point in the history
  • Loading branch information
manan164 committed Jun 10, 2024
1 parent 2de6993 commit b62b709
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,11 @@ class SubWorkflowSpec extends AbstractSpecification {
tasks[0].taskType == 'integration_task_1'
tasks[0].status == Task.Status.COMPLETED
tasks[1].taskType == 'SUB_WORKFLOW'
tasks[1].status == Task.Status.SCHEDULED
tasks[1].status == Task.Status.IN_PROGRESS
}

when: "the subworkflow is started by issuing a system task call"
List<String> polledTaskIds = queueDAO.pop("SUB_WORKFLOW", 1, 200)
String subworkflowTaskId = polledTaskIds.get(0)
asyncSystemTaskExecutor.execute(subWorkflowTask, subworkflowTaskId)
String subworkflowTaskId = workflowExecutionService.getExecutionStatus(workflowInstanceId, true).getTasks().get(1).getTaskId()

then: "verify that the 'sub_workflow_task' is in a IN_PROGRESS state"
with(workflowExecutionService.getExecutionStatus(workflowInstanceId, true)) {
Expand Down Expand Up @@ -251,7 +249,7 @@ class SubWorkflowSpec extends AbstractSpecification {
tasks[0].taskType == 'integration_task_1'
tasks[0].status == Task.Status.COMPLETED
tasks[1].taskType == 'SUB_WORKFLOW'
tasks[1].status == Task.Status.SCHEDULED
tasks[1].status == Task.Status.IN_PROGRESS
}

when: "Polled for and executed subworkflow task"
Expand Down Expand Up @@ -351,7 +349,7 @@ class SubWorkflowSpec extends AbstractSpecification {
tasks[0].taskType == 'integration_task_1'
tasks[0].status == Task.Status.COMPLETED
tasks[1].taskType == 'SUB_WORKFLOW'
tasks[1].status == Task.Status.SCHEDULED
tasks[1].status == Task.Status.IN_PROGRESS
}

when: "the subworkflow is started by issuing a system task call"
Expand Down

0 comments on commit b62b709

Please sign in to comment.