Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
Updated CassandraExecutionDAO to return Workflow tasks in sorted order.
Browse files Browse the repository at this point in the history
  • Loading branch information
kishorebanala committed Mar 26, 2019
1 parent b7d073f commit dcf97e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

import javax.inject.Inject;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.LinkedList;
import java.util.List;
import java.util.Optional;
Expand Down Expand Up @@ -379,6 +380,7 @@ public Workflow getWorkflow(String workflowId, boolean includeTasks) {

if (workflow != null) {
recordCassandraDaoRequests("getWorkflow", "n/a", workflow.getWorkflowName());
tasks.sort(Comparator.comparingInt(Task::getSeq));
workflow.setTasks(tasks);
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public interface ExecutionDAO {
/**
*
* @param workflowId workflow instance id
* @param includeTasks if set, includes the tasks (pending and completed)
* @param includeTasks if set, includes the tasks (pending and completed) sorted by Task Sequence number in Workflow.
* @return Workflow instance details
*
*/
Expand Down

0 comments on commit dcf97e6

Please sign in to comment.