Flowable中TaskServiceAPI详解
1.Comment addComment(String taskId,String processInstanceId,String message)
向任务和/或流程实例添加注释。
2.Comment addComment(String taskId,String processInstanceId,String type,String message)
使用自定义类型向任务和/或流程实例添加注释。
3.void saveComment(Comment comment)
更新任务和/或流程实例的注释。
4.Comment getComment(String commentId)
返回具有给定id的单个注释。如果给定id没有注释,则返回null。
5.void deleteComments(String taskId,String processInstanceId)
从提供的任务和/或流程实例中删除所有注释。
6.void deleteComment(String commentId)
删除具有给定id的单个注释。
抛出:
flowableobjectnotfoundexception -当给定id没有注释存在时。
7.List getTaskComments(String taskId)
与给定任务相关的注释。
8.List getTaskComments(String taskId,String type)
与给定类型的给定任务相关的注释。
9.List getCommentsByType(String type)
给定类型的所有注释。
10.List getTaskEvents(String taskId)
与给定任务相关的所有事件。
11.Event getEvent(String eventId)
返回具有给定id的单个事件。如果给定id的事件不存在,则返回null。
12.List getProcessInstanceComments(String processInstanceId)
与给定流程实例相关的注释。
13.List getProcessInstanceComments(String processInstanceId,String type)
与给定流程实例相关的注释。
14.Attachment createAttachment(String attachmentType,String taskId,String processInstanceId,String attachmentName,String attachmentDescription,InputStream content)
向任务和/或流程实例添加新附件,并使用输入流提供内容
15.Attachment createAttachment(String attachmentType,String taskId,String processInstanceId,String attachmentName,String attachmentDescription,String url)
向任务和/或流程实例添加新的附件,并使用url作为内容
16.void saveAttachment(Attachment attachment)
更新附件的名称和描述
17.Attachment getAttachment(String attachmentId)
检索特定的附件
18.InputStream getAttachmentContent(String attachmentId)
检索特定附件的流内容
19.List getTaskAttachments(String taskId)
与任务关联的附件列表
20.List getProcessInstanceAttachments(String processInstanceId)
与流程实例相关联的附件列表
21.void deleteAttachment(String attachmentId)
删除附件
22.List<org.flowable.task.api.Task> getSubTasks(String parentTaskId)
此父任务的子任务列表