1.
添加審批意見
String userId="zhang3";
//需要添加此句否則審批意見表中ACT_HI_COMMENT,審批人的userId是空的
Authentication.setAuthenticatedUserId(userId);
taskService.addComment(taskId,processInstanceId,message);
taskService.complete(taskId);
查詢審批意見:
List<Comment> comments=taskService.getTaskComments(taskId);
2.也可以通過爲task設置本地local變量來添加審批意見和其他需要的額外字段