@staticmethod<EOL><INDENT>def export_process_to_csv(bpmn_diagram, directory, filename):<DEDENT>
nodes = copy.deepcopy(bpmn_diagram.get_nodes())<EOL>start_nodes = []<EOL>export_elements = []<EOL>for node in nodes:<EOL><INDENT>incoming_list = node[<NUM_LIT:1>].get(consts.Consts.incoming_flow)<EOL>if len(incoming_list) == <NUM_LIT:0>:<EOL><INDENT>start_nodes.append(node)<EOL><DEDENT><DEDENT>if len(start_nodes) != <NUM_LIT:1>:<EOL><INDENT>raise bpmn_exception.BpmnPythonError("<STR_LIT>")<EOL><DEDENT>nodes_classification = utils.BpmnImportUtils.generate_nodes_clasification(bpmn_diagram)<EOL>start_node = start_nodes.pop()<EOL>BpmnDiagramGraphCsvExport.export_node(bpmn_diagram, export_elements, start_node, nodes_classification)<EOL>try:<EOL><INDENT>os.makedirs(directory)<EOL><DEDENT>except OSError as exception:<EOL><INDENT>if exception.errno != errno.EEXIST:<EOL><INDENT>raise<EOL><DEDENT><DEDENT>file_object = open(directory + filename, "<STR_LIT:w>")<EOL>file_object.write("<STR_LIT>")<EOL>BpmnDiagramGraphCsvExport.write_export_node_to_file(file_object, export_elements)<EOL>file_object.close()<EOL>
Root method of CSV export functionality.

:param bpmn_diagram: an instance of BpmnDiagramGraph class,
:param directory: a string object, which is a path of output directory,
:param filename: a string object, which is a name of output file.