Generating BPMN process diagram with path it traversed

I am having requirement to display the process instance diagram with the path it traversed like “Show process diagram” in admin app. By using this diagram, user can able to understand what are all the tasks has been done and how much pending still. Is there any possibility to do the same using Flowable API.

As of now i am using the below code, that shows only the current activity.

ProcessDiagramGenerator diagramGenerator = processEngineConfiguration.getProcessDiagramGenerator();
InputStream stream = diagramGenerator.generateDiagram(bpmnModel, “png”, activityIds, flowIds,processEngineConfiguration.getActivityFontName(), processEngineConfiguration.getLabelFontName(), processEngineConfiguration.getAnnotationFontName(), processEngineConfiguration.getClassLoader(), 1.0,processEngineConfiguration.isDrawSequenceFlowNameWithNoLabelDI());
Thanks in advance…