def save_vis_bpmn(bpmn_graph, file_path): """ Saves the visualization of a BPMN graph Parameters -------------- bpmn_graph BPMN graph file_path Destination path """ format = file_path[file_path.index(".") + 1:].lower() from pm4py.visualization.bpmn import visualizer as bpmn_visualizer parameters = bpmn_visualizer.Variants.CLASSIC.value.Parameters gviz = bpmn_visualizer.apply(bpmn_graph, parameters={parameters.FORMAT: format}) bpmn_visualizer.save(gviz, file_path)
def save_vis_bpmn(bpmn_graph: BPMN, file_path: str): """ Saves the visualization of a BPMN graph Parameters -------------- bpmn_graph BPMN graph file_path Destination path """ format = os.path.splitext(file_path)[1][1:] from pm4py.visualization.bpmn import visualizer as bpmn_visualizer parameters = bpmn_visualizer.Variants.CLASSIC.value.Parameters gviz = bpmn_visualizer.apply(bpmn_graph, parameters={parameters.FORMAT: format}) bpmn_visualizer.save(gviz, file_path)