Search in sources :

Example 1 with DefaultProcessDiagramGenerator

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);
}
Also used : DefaultProcessDiagramGenerator(org.flowable.image.impl.DefaultProcessDiagramGenerator) BpmnModel(org.flowable.bpmn.model.BpmnModel)

Aggregations

BpmnModel (org.flowable.bpmn.model.BpmnModel)1 DefaultProcessDiagramGenerator (org.flowable.image.impl.DefaultProcessDiagramGenerator)1