What I did is below :
As suggested, I added the String name from SequenceFlow Object as parameter in a second method :
Activiti-activiti-5.16.3\modules\activiti-image-generator\src\main\java\org\activiti\image\impl\DefaultProcessDiagramCanvas.java :
<java>
public void drawSequenceflow(String name, int[] xPoints, int[] yPoints, boolean conditional, boolean isDefault, boolean highLighted, double scaleFactor) {
LOGGER.info("drawSequenceflow");
LOGGER.info("name : {}", name);
drawConnection(xPoints, yPoints, conditional, isDefault, "sequenceFlow", AssociationDirection.ONE, highLighted, scaleFactor);
for (int i=1; i<xPoints.length; i++) {
Integer sourceX = xPoints;
Integer sourceY = yPoints;
g.drawString(name, sourceX, sourceY);
}
}
</java>
Activiti-activiti-5.16.3\modules\activiti-image-generator\src\main\java\org\activiti\image\impl\DefaultProcessDiagramGenerator.java :
<java>
processDiagramCanvas.drawSequenceflow(sequenceFlow.getName(), xPoints, yPoints, drawConditionalIndicator, isDefault, highLighted, scaleFactor);
</java>
However, I can see in the logs that the name is always null, but when I create a workflow with Activiti Explorer and then I export it, I can see the name of the sequenceFlow.
Maybe I make a mistake, but I don't know where…