Hello everybody !I am use the ProcessDiagramGenerator.generateDiagram API to generate deagram,but connot display Chinese ProcessDefinitionEntity processDefinition = (ProcessDefinitionEntity)
((RepositoryServiceImpl) activiti.getRepositoryService()).getDeployedProcessDefinition(instance
.getProcessDefinitionId());
if (processDefinition != null && processDefinition.isGraphicalNotationDefined()) {
InputStream in = ProcessDiagramGenerator.generateDiagram(activiti.getRepositoryService().getBpmnModel(instance.getProcessDefinitionId()), "png",
activiti.getRuntimeService().getActiveActivityIds(instance.getId()));
try {
OutputStream out = new FileOutputStream(new File("d:\\Diagram.png"));
IOUtils.copy(in, out);
in.close();
out.flush();
out.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
or using the following way and the Disagram.png are not open
InputStreamReader reader = new InputStreamReader(in);
OutputStream out = new FileOutputStream(new File("d:\\Diagram.png"));
IOUtils.copy(reader, out,"utf-8");
Thanks!