当前位置: 首页>>代码示例>>Java>>正文


Java TaskQuery.listPage方法代码示例

本文整理汇总了Java中org.activiti.engine.task.TaskQuery.listPage方法的典型用法代码示例。如果您正苦于以下问题:Java TaskQuery.listPage方法的具体用法?Java TaskQuery.listPage怎么用?Java TaskQuery.listPage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.activiti.engine.task.TaskQuery的用法示例。


在下文中一共展示了TaskQuery.listPage方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: queryRuntimeTasks

import org.activiti.engine.task.TaskQuery; //导入方法依赖的package包/类
private List<WorkflowTask> queryRuntimeTasks(WorkflowTaskQuery query)
{
   // Runtime-tasks only exist on process-instances that are active
   // so no use in querying runtime tasks if not active
   if (!Boolean.FALSE.equals(query.isActive()))
   {
       TaskQuery taskQuery = createRuntimeTaskQuery(query);

       List<Task> results;
       int limit = query.getLimit();
       if (limit > 0)
       {
           results = taskQuery.listPage(0, limit);
       }
       else
       {
           results = taskQuery.list();
       }
       return getValidWorkflowTasks(results);
   }
   return new ArrayList<WorkflowTask>();
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:23,代码来源:ActivitiWorkflowEngine.java

示例2: searchWorkItems

import org.activiti.engine.task.TaskQuery; //导入方法依赖的package包/类
public SearchResultList<WorkItemType> searchWorkItems(ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options, OperationResult result)
		throws SchemaException {
	TaskQuery taskQuery = createTaskQuery(query, true, options, result);
	if (taskQuery == null) {
		return new SearchResultList<>(Collections.emptyList());
	}
	Integer offset = query != null ? query.getOffset() : null;
	Integer maxSize = query != null ? query.getMaxSize() : null;
	List<Task> tasks;
	if (offset == null && maxSize == null) {
		tasks = taskQuery.list();
	} else {
		tasks = taskQuery.listPage(defaultIfNull(offset, 0), defaultIfNull(maxSize, Integer.MAX_VALUE));
	}
	boolean getAllVariables = true;				// TODO implement based on options
	// there's no need to fill-in assignee details ; but candidates are necessary to fill-in; TODO implement based on options (resolve)
	return tasksToWorkItems(tasks, null, false, false, true, getAllVariables, result);
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:19,代码来源:WorkItemProvider.java

示例3: myAppTodoTasks

import org.activiti.engine.task.TaskQuery; //导入方法依赖的package包/类
@RequestMapping(value = "/form/app/todo", method = RequestMethod.GET, produces = "application/json")
public Object myAppTodoTasks(HttpServletRequest request, String userId) {

	PageParams pp = ui.getPageParams(request);
	List<TodoTaskVo> todoTasks = new ArrayList<TodoTaskVo>();

	TaskQuery taskQuery = this.taskService.createTaskQuery();
	long taskCount = taskQuery.taskCandidateOrAssigned(userId).count();
	if (taskCount > 0) {
		List<Task> tasks = taskQuery.listPage(pp.getOffset(), pp.getLimit());
		for (Task t : tasks) {
			TodoTaskVo todo = new TodoTaskVo();
			todo.setTaskId(t.getId());
			todo.setTitle(t.getName());
			todo.setDisplayTime(t.getCreateTime());
			todoTasks.add(todo);
		}
	}

	PageList<TodoTaskVo> pageList = new PageList<TodoTaskVo>(todoTasks, new Paginator(taskCount));
	return ui.putData(pageList);
}
 
开发者ID:KayuraTeam,项目名称:kayura-uasp,代码行数:23,代码来源:WorkflowRestResoutce.java

示例4: findTasks

import org.activiti.engine.task.TaskQuery; //导入方法依赖的package包/类
public List<JournalTask> findTasks(CfJournalType journalType, Integer offset, Integer limit) {
    String prefix = CfJournal.class.getCanonicalName() + ":" + journalType.name() + ":" + "%";
    log.debug("prefix: " + prefix);
    TaskQuery taskQuery = taskService.createTaskQuery();
    taskQuery.taskNameLike(prefix);
    taskQuery.orderByTaskCreateTime();
    taskQuery.desc();
    List<Task> list = taskQuery.listPage(offset, limit);
    return toDocumentTasks(list);
}
 
开发者ID:rafizanbaharum,项目名称:cfi-gov,代码行数:11,代码来源:JournalWorkflowImpl.java


注:本文中的org.activiti.engine.task.TaskQuery.listPage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。