Package org.kie.server.client.util
Class TaskDataReader
- java.lang.Object
-
- org.kie.server.client.util.TaskDataReader
-
public class TaskDataReader extends Object
Helper class for reading all the elements returned by theTaskAssigningRuntimeClient.findTasks(java.lang.Long, java.util.List<java.lang.String>, java.time.LocalDateTime, java.lang.Integer, java.lang.Integer, org.kie.server.api.model.taskassigning.TaskInputVariablesReadMode)
methods. This class manages the required pagination for getting all the results.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TaskDataReader.Result
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TaskDataReader
from(TaskAssigningRuntimeClient runtimeClient)
TaskDataReader.Result
readTasks(long fromTaskId, List<String> status, LocalDateTime fromLastModificationDate, int pageSize)
Executes theTaskAssigningRuntimeClient.findTasks(Long, List, LocalDateTime, Integer, Integer, TaskInputVariablesReadMode)
method and return all the results.TaskDataReader.Result
readTasks(long fromTaskId, List<String> status, LocalDateTime fromLastModificationDate, int pageSize, org.kie.server.api.model.taskassigning.TaskInputVariablesReadMode taskInputVariablesReadMode)
Executes theTaskAssigningRuntimeClient.findTasks(Long, List, LocalDateTime, Integer, Integer, TaskInputVariablesReadMode)
method and return all the results.
-
-
-
Method Detail
-
from
public static TaskDataReader from(TaskAssigningRuntimeClient runtimeClient)
-
readTasks
public TaskDataReader.Result readTasks(long fromTaskId, List<String> status, LocalDateTime fromLastModificationDate, int pageSize, org.kie.server.api.model.taskassigning.TaskInputVariablesReadMode taskInputVariablesReadMode)
Executes theTaskAssigningRuntimeClient.findTasks(Long, List, LocalDateTime, Integer, Integer, TaskInputVariablesReadMode)
method and return all the results. The paging reading is managed internally by this method.- Parameters:
fromTaskId
- filters the tasks with taskId >= fromTaskId. If null no filtering is applied.status
- filters the tasks that are in one of the following status. If null or the empty list no filtering is applied.fromLastModificationDate
- filters the tasks with lastModificationDate >= fromLastModificationDate. If null no filtering is applied.pageSize
- sets the pageSize for the paged reading.taskInputVariablesReadMode
- establishes the tasks input variables reading mode.- Returns:
- a list of TaskData with the jBPM tasks that met the filtering conditions. The potential owners of the task is properly loaded with all the elements. The task inputs data is loaded accordingly with the selected taskInputVariablesReadMode.
- See Also:
TaskInputVariablesReadMode
-
readTasks
public TaskDataReader.Result readTasks(long fromTaskId, List<String> status, LocalDateTime fromLastModificationDate, int pageSize)
Executes theTaskAssigningRuntimeClient.findTasks(Long, List, LocalDateTime, Integer, Integer, TaskInputVariablesReadMode)
method and return all the results. The paging reading is managed internally by this method.- Parameters:
fromTaskId
- filters the tasks with taskId >= fromTaskId. If null no filtering is applied.status
- filters the tasks that are in one of the following status. If null or the empty list no filtering is applied.fromLastModificationDate
- filters the tasks with lastModificationDate >= fromLastModificationDate. If null no filtering is applied.pageSize
- sets the pageSize for the paged reading.- Returns:
- a list of TaskData with the jBPM tasks that met the filtering conditions. The potential owners of the task is properly loaded with all the elements. No task inputs data is loaded by this method.
-
-