flowable生成流程图中文乱码问题

flowable.activity-font-name=宋体
flowable.annotation-font-name=宋体
flowable.label-font-name=宋体

flowable.async-executor-activate=false
#  将databaseSchemaUpdate设置为true。当Flowable发现库与数据库表结构不一致时,会自动将数据库表结构升级至新版本。
flowable.database-schema-update=false
flowable.enable-history-cleaning=true
flowable.history-cleaning-after-days=365
flowable.history-cleaning-cycle=0 0 1 * * ?
flowable.activity-font-name=宋体
flowable.annotation-font-name=宋体
flowable.label-font-name=宋体

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
您可以使用Flowable的API来获取流程图。首先,您需要获取到流程定义的ID,可以通过Flowable的RepositoryService来查询。然后,使用Flowable的DiagramGenerator类来生成流程图。 下面是一个示例代码片段,展示了如何获取流程定义的ID并生成流程图: ```java import org.flowable.bpmn.model.BpmnModel; import org.flowable.dmn.api.DmnRepositoryService; import org.flowable.engine.RepositoryService; import org.flowable.image.ProcessDiagramGenerator; // 获取RepositoryService RepositoryService repositoryService = flowable.getRepositoryService(); // 通过流程定义的Key查询最新版本的流程定义 String processDefinitionKey = "yourProcessDefinitionKey"; String processDefinitionId = repositoryService.createProcessDefinitionQuery() .processDefinitionKey(processDefinitionKey) .latestVersion() .singleResult() .getId(); // 获取BpmnModel BpmnModel bpmnModel = repositoryService.getBpmnModel(processDefinitionId); // 获取ProcessDiagramGenerator ProcessDiagramGenerator diagramGenerator = flowable.getProcessEngineConfiguration() .getProcessDiagramGenerator(); // 生成流程图 InputStream imageStream = diagramGenerator.generateDiagram(bpmnModel, "png", Collections.emptyList(), Collections.emptyList(), flowable.getProcessEngine().getProcessEngineConfiguration().getActivityFontName(), flowable.getProcessEngine().getProcessEngineConfiguration().getLabelFontName(), flowable.getProcessEngine().getProcessEngineConfiguration().getClassLoader(), 1.0); ``` 请注意,这只是一个简化的示例代码,并不包含完整的异常处理和其他细节。您可能需要根据您的实际情况进行适当的修改和扩展。 希望对您有所帮助!如有任何疑问,请随时提问。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值