activiti工作流解决历史批注中文乱码

编程入门 行业动态 更新时间:2024-10-11 11:23:09

activiti<a href=https://www.elefans.com/category/jswz/34/1770249.html style=工作流解决历史批注中文乱码"/>

activiti工作流解决历史批注中文乱码

时间:2020-03-19
本文章向大家介绍activiti工作流解决历史批注中文乱码,主要包括activiti工作流解决历史批注中文乱码使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

/**

  • 根据流程实例查询流程的批注信息
  • @param processInstanceId
  • @return
    */
    private List findCommentByProcessInstanceId(String processInstanceId) {
    return taskService.getProcessInstanceComments(processInstanceId);
    }
    默认获取到的Comment是没有getMessage()方法的,只有getFullMessage(),getFullMessage会跟随部署的系统编码,保存到数据库中的bolb字段可能会出现乱码,但是message字段不是乱码,如果审批备注只是文字的话,可以直接取message字段的值。
    查看源码得知,CommentEntityImpl 实现了Comment类接口,既可以把Comment 转换为CommentEntityImpl,直接用其中的getMessage()方法即可。

List list = findCommentByProcessInstanceId(processInstanceId);
for (Comment commentEntity : list) {
CommentEntityImpl comment = null;
if(commentEntity instanceof CommentEntityImpl){
comment = (CommentEntityImpl)commentEntity;
}
String message = comment.getMessage();

更多推荐

activiti工作流解决历史批注中文乱码

本文发布于:2024-03-05 13:42:02,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1712443.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:工作流   乱码   中文   历史   activiti

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!