activiti工作流05-完成任務

完成任務需要用到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();
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章