@staticmethod<EOL><INDENT>def export_element(bpmn_graph, export_elements, node, nodes_classification, order=<NUM_LIT:0>, prefix="<STR_LIT>", condition="<STR_LIT>",<EOL>who="<STR_LIT>", add_join=False):<DEDENT>
node_type = node[<NUM_LIT:1>][consts.Consts.type]<EOL>node_classification = nodes_classification[node[<NUM_LIT:0>]]<EOL>outgoing_flows = node[<NUM_LIT:1>].get(consts.Consts.outgoing_flow)<EOL>if node_type != consts.Consts.parallel_gateway and consts.Consts.default in node[<NUM_LIT:1>]and node[<NUM_LIT:1>][consts.Consts.default] is not None:<EOL><INDENT>default_flow_id = node[<NUM_LIT:1>][consts.Consts.default]<EOL><DEDENT>else:<EOL><INDENT>default_flow_id = None<EOL><DEDENT>if BpmnDiagramGraphCsvExport.classification_join in node_classification and not add_join:<EOL><INDENT>if node_type == consts.Consts.task or node_type == consts.Consts.subprocess:<EOL><INDENT>return node<EOL><DEDENT>else:<EOL><INDENT>outgoing_flow_id = outgoing_flows[<NUM_LIT:0>]<EOL>outgoing_flow = bpmn_graph.get_flow_by_id(outgoing_flow_id)<EOL>outgoing_node = bpmn_graph.get_node_by_id(outgoing_flow[<NUM_LIT:2>][consts.Consts.target_ref])<EOL>return outgoing_node<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if node_type == consts.Consts.task:<EOL><INDENT>export_elements.append({"<STR_LIT>": prefix + str(order), "<STR_LIT>": node[<NUM_LIT:1>][consts.Consts.node_name],<EOL>"<STR_LIT>": condition, "<STR_LIT>": who, "<STR_LIT>": "<STR_LIT>", "<STR_LIT>": "<STR_LIT>"})<EOL><DEDENT>elif node_type == consts.Consts.subprocess:<EOL><INDENT>export_elements.append({"<STR_LIT>": prefix + str(order), "<STR_LIT>": node[<NUM_LIT:1>][consts.Consts.node_name],<EOL>"<STR_LIT>": condition, "<STR_LIT>": who, "<STR_LIT>": "<STR_LIT:yes>", "<STR_LIT>": "<STR_LIT>"})<EOL><DEDENT><DEDENT>if BpmnDiagramGraphCsvExport.classification_split in node_classification:<EOL><INDENT>next_node = None<EOL>alphabet_suffix_index = <NUM_LIT:0><EOL>for outgoing_flow_id in outgoing_flows:<EOL><INDENT>outgoing_flow = bpmn_graph.get_flow_by_id(outgoing_flow_id)<EOL>outgoing_node = bpmn_graph.get_node_by_id(outgoing_flow[<NUM_LIT:2>][consts.Consts.target_ref])<EOL>suffix = string.ascii_lowercase[alphabet_suffix_index]<EOL>next_prefix = prefix + str(order) + suffix<EOL>alphabet_suffix_index += <NUM_LIT:1><EOL>if node_type != consts.Consts.parallel_gateway and consts.Consts.name in outgoing_flow[<NUM_LIT:2>]and outgoing_flow[<NUM_LIT:2>][consts.Consts.name] is not None:<EOL><INDENT>condition = outgoing_flow[<NUM_LIT:2>][consts.Consts.name]<EOL><DEDENT>else:<EOL><INDENT>condition = "<STR_LIT>"<EOL><DEDENT>if BpmnDiagramGraphCsvExport.classification_join in nodes_classification[outgoing_node[<NUM_LIT:0>]]:<EOL><INDENT>export_elements.append(<EOL>{"<STR_LIT>": next_prefix + str(<NUM_LIT:1>), "<STR_LIT>": "<STR_LIT>" + prefix + str(order + <NUM_LIT:1>),<EOL>"<STR_LIT>": condition, "<STR_LIT>": who, "<STR_LIT>": "<STR_LIT>", "<STR_LIT>": "<STR_LIT>"})<EOL><DEDENT>elif outgoing_flow_id == default_flow_id:<EOL><INDENT>tmp_next_node = BpmnDiagramGraphCsvExport.export_node(bpmn_graph, export_elements, outgoing_node,<EOL>nodes_classification, <NUM_LIT:1>, next_prefix, "<STR_LIT>",<EOL>who)<EOL>if tmp_next_node is not None:<EOL><INDENT>next_node = tmp_next_node<EOL><DEDENT><DEDENT>else:<EOL><INDENT>tmp_next_node = BpmnDiagramGraphCsvExport.export_node(bpmn_graph, export_elements, outgoing_node,<EOL>nodes_classification, <NUM_LIT:1>, next_prefix,<EOL>condition, who)<EOL>if tmp_next_node is not None:<EOL><INDENT>next_node = tmp_next_node<EOL><DEDENT><DEDENT><DEDENT>if next_node is not None:<EOL><INDENT>return BpmnDiagramGraphCsvExport.export_node(bpmn_graph, export_elements, next_node,<EOL>nodes_classification, order=(order + <NUM_LIT:1>), prefix=prefix,<EOL>who=who, add_join=True)<EOL><DEDENT><DEDENT>elif len(outgoing_flows) == <NUM_LIT:1>:<EOL><INDENT>outgoing_flow_id = outgoing_flows[<NUM_LIT:0>]<EOL>outgoing_flow = bpmn_graph.get_flow_by_id(outgoing_flow_id)<EOL>outgoing_node = bpmn_graph.get_node_by_id(outgoing_flow[<NUM_LIT:2>][consts.Consts.target_ref])<EOL>return BpmnDiagramGraphCsvExport.export_node(bpmn_graph, export_elements, outgoing_node,<EOL>nodes_classification, order=(order + <NUM_LIT:1>), prefix=prefix,<EOL>who=who)<EOL><DEDENT>else:<EOL><INDENT>return None<EOL><DEDENT>
Export a node with "Element" classification (task, subprocess or gateway)

:param bpmn_graph: an instance of BpmnDiagramGraph class,
:param export_elements: a dictionary object. The key is a node ID, value is a dictionary of parameters that
       will be used in exported CSV document,
:param node: networkx.Node object,
:param nodes_classification: dictionary of classification labels. Key - node id. Value - a list of labels,
:param order: the order param of exported node,
:param prefix: the prefix of exported node - if the task appears after some gateway, the prefix will identify
       the branch
:param condition: the condition param of exported node,
:param who: the condition param of exported node,
:param add_join: boolean flag. Used to indicate if "Join" element should be added to CSV.
:return: None or the next node object if the exported node was a gateway join.