Skip to content

addComment

Flowable 7.1.0 摘要:在任务和/或过程实例中添加注释。

方法签名与说明

Comment addComment ( String taskId, String processInstanceId, String message)

在任务和/或过程实例中添加注释。

Comment addComment ( String taskId, String processInstanceId, String type, String message)

使用自定义类型添加评论和/或过程实例。

常见使用场景

  • 记录审批意见、沟通记录,辅助审计。
  • 在工单详情页展示历史批注。
  • 官方摘要:在任务和/或过程实例中添加注释。

Kotlin 调用示例

kotlin
val taskId = "TASKID"
val processInstanceId = "PROCESSINSTANCEID"
val message = "MESSAGE"

taskService.addComment(taskId, processInstanceId, message)

注意事项

  • 批注通常用于审计,建议保留原始文本。
  • 删除批注前确认业务是否允许。
  • 调用前请确认当前用户具备相应的任务/流程操作权限。
  • 本文基于 Flowable 7.1.0 Javadoc。

相关 API

  • addComment
  • getTaskComments
  • deleteComment