activiti工作流05-完成任務
阿新 • • 發佈:2019-01-27
完成任務需要用到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();