您的位置:首页 > 其它

activiti工作流05-完成任务

2016-08-18 16:15 441 查看
完成任务需要用到TaskService.

常用的方法有:

1,

void     complete(String taskId)

Called when the task is successfully executed.

2,

void     complete(String taskId, Map<String,Object> variables)

Called when the task is successfully executed, and the required task parameters are given by the end-user.

3,

void     complete(String taskId, Map<String,Object> variables, boolean localScope)

Called when the task is successfully executed, and the required task paramaters are given by the end-user.

另外,获取特定用户的所有待办任务的方法为:

taskService.createTaskQuery().taskCandidateOrAssigned(user.getId()).active();

排序:

taskService.createTaskQuery().taskCandidateOrAssigned(user.getId()).active().orderByTaskId().desc().list();
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息