use of org.kie.internal.task.api.TaskContext in project jbpm by kiegroup.
the class GetAllAuditTasksByStatusCommand method execute.
@Override
public List<AuditTask> execute(Context context) {
TaskPersistenceContext persistenceContext = ((TaskContext) context).getPersistenceContext();
List<AuditTask> groupTasks = persistenceContext.queryWithParametersInTransaction("getAllAuditTasksByStatus", persistenceContext.addParametersToMap("owner", userId, "statuses", filter.getParams().get("statuses"), "firstResult", filter.getOffset(), "maxResults", filter.getCount()), ClassUtil.<List<AuditTask>>castClass(List.class));
return groupTasks;
}
use of org.kie.internal.task.api.TaskContext in project jbpm by kiegroup.
the class GetAllGroupAuditTasksByUserCommand method execute.
@Override
public List<AuditTask> execute(Context context) {
TaskPersistenceContext persistenceContext = ((TaskContext) context).getPersistenceContext();
boolean userExists = doCallbackUserOperation(userId, (TaskContext) context);
List<String> groupIds = doUserGroupCallbackOperation(userId, null, (TaskContext) context);
groupIds.add(userId);
List<AuditTask> groupTasks = persistenceContext.queryWithParametersInTransaction("getAllGroupAuditTasksByUser", persistenceContext.addParametersToMap("potentialOwners", groupIds, "firstResult", filter.getOffset(), "maxResults", filter.getCount()), ClassUtil.<List<AuditTask>>castClass(List.class));
return groupTasks;
}
use of org.kie.internal.task.api.TaskContext in project jbpm by kiegroup.
the class GetTasksForProcessCommand method execute.
@Override
public List<TaskSummary> execute(Context context) {
TaskContext ctx = (TaskContext) context;
TaskPersistenceContext persistenceContext = ctx.getPersistenceContext();
List<TaskSummary> tasks = (List<TaskSummary>) persistenceContext.queryWithParametersInTransaction("TasksByStatusByProcessId", persistenceContext.addParametersToMap("processInstanceId", processInstanceId, "status", statuses), ClassUtil.<List<TaskSummary>>castClass(List.class));
return tasks;
}
use of org.kie.internal.task.api.TaskContext in project jbpm by kiegroup.
the class CleanUpCommand method execute.
@Override
public Void execute(Context context) {
TaskPersistenceContext persistenceContext = ((TaskContext) context).getPersistenceContext();
persistenceContext.executeUpdateString("delete from NodeInstanceLog nid");
persistenceContext.executeUpdateString("delete from ProcessInstanceLog pid");
persistenceContext.executeUpdateString("delete from VariableInstanceLog vsd");
persistenceContext.executeUpdateString("delete from AuditTaskImpl vsd");
return null;
}
Aggregations