I’m trying to show the graphic of the process diagram associated to an active task
Task t = Bpm.engine().getTaskService().createTaskQuery().taskId(request.getParameter(“id”)).singleResult();
BpmnModel model = Bpm.engine().getRepositoryService().getBpmnModel(t.getProcessDefinitionId());
InputStream is = Bpm.engine().getProcessEngineConfiguration().getProcessDiagramGenerator().generateJpgDiagram(model);
I am getting a NPE
Caused by: java.lang.NullPointerException
at org.flowable.image.impl.DefaultProcessDiagramGenerator.initProcessDiagramCanvas(DefaultProcessDiagramGenerator.java:887)
When looking at the sources, it seems that
GraphicInfo flowNodeGraphicInfo = bpmnModel.getGraphicInfo(flowNode.getId());
For the first flowNode found (startprocess1) returns null
Am I missing some configuration so as to save the bmpndi when deploying? Why does it return null?
How was the BPMN XML created?
It seems that it’s missing BPMN DI information (at least for this element), and therefore it can’t generate de process diagram.