use of org.jbpm.services.task.impl.TaskSummaryQueryBuilderImpl in project jbpm by kiegroup.
the class RuntimeDataServiceImpl method getTasksByVariable.
@Override
public List<TaskSummary> getTasksByVariable(String userId, String variableName, List<Status> statuses, QueryContext queryContext) {
TaskSummaryQueryBuilder queryBuilder = new TaskSummaryQueryBuilderImpl(userId, taskService).intersect();
addVariableNameAndVariableValueParameters(queryBuilder, variableName);
if (statuses != null && !statuses.isEmpty()) {
queryBuilder.status(statuses.toArray(new Status[statuses.size()]));
}
setQueryContextOptions(queryContext, queryBuilder);
return queryBuilder.build().getResultList();
}
use of org.jbpm.services.task.impl.TaskSummaryQueryBuilderImpl in project jbpm by kiegroup.
the class RuntimeDataServiceImpl method getTasksByVariableAndValue.
@Override
public List<TaskSummary> getTasksByVariableAndValue(String userId, String variableName, String variableValue, List<Status> statuses, QueryContext queryContext) {
TaskSummaryQueryBuilder queryBuilder = new TaskSummaryQueryBuilderImpl(userId, taskService).intersect();
addVariableNameAndVariableValueParameters(queryBuilder, variableName, variableValue);
if (statuses != null && !statuses.isEmpty()) {
queryBuilder.status(statuses.toArray(new Status[statuses.size()]));
}
setQueryContextOptions(queryContext, queryBuilder);
return queryBuilder.build().getResultList();
}
Aggregations