完成任务需要用到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();
常用的方法有:
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();