use of org.flowable.image.impl.DefaultProcessDiagramGenerator in project RuoYi-Flowable-Plus by KonBAI-Q.
the class WfDefinitionServiceImpl method readImage.
/**
* 读取xml
*
* @param definitionId 流程定义ID
* @return
*/
@Override
public InputStream readImage(String definitionId) {
// 获得图片流
DefaultProcessDiagramGenerator diagramGenerator = new DefaultProcessDiagramGenerator();
BpmnModel bpmnModel = repositoryService.getBpmnModel(definitionId);
// 输出为图片
return diagramGenerator.generateDiagram(bpmnModel, "png", Collections.emptyList(), Collections.emptyList(), "宋体", "宋体", "宋体", null, 1.0, false);
}
Aggregations