@staticmethod<EOL><INDENT>def import_sequence_flow_to_graph(diagram_graph, sequence_flows, process_id, flow_element):<DEDENT>
flow_id = flow_element.getAttribute(consts.Consts.id)<EOL>name = flow_element.getAttribute(consts.Consts.name) if flow_element.hasAttribute(consts.Consts.name) else "<STR_LIT>"<EOL>source_ref = flow_element.getAttribute(consts.Consts.source_ref)<EOL>target_ref = flow_element.getAttribute(consts.Consts.target_ref)<EOL>sequence_flows[flow_id] = {consts.Consts.name: name, consts.Consts.source_ref: source_ref,<EOL>consts.Consts.target_ref: target_ref}<EOL>diagram_graph.add_edge(source_ref, target_ref)<EOL>diagram_graph[source_ref][target_ref][consts.Consts.id] = flow_id<EOL>diagram_graph[source_ref][target_ref][consts.Consts.process] = process_id<EOL>diagram_graph[source_ref][target_ref][consts.Consts.name] = name<EOL>diagram_graph[source_ref][target_ref][consts.Consts.source_ref] = source_ref<EOL>diagram_graph[source_ref][target_ref][consts.Consts.target_ref] = target_ref<EOL>for element in utils.BpmnImportUtils.iterate_elements(flow_element):<EOL><INDENT>if element.nodeType != element.TEXT_NODE:<EOL><INDENT>tag_name = utils.BpmnImportUtils.remove_namespace_from_tag_name(element.tagName)<EOL>if tag_name == consts.Consts.condition_expression:<EOL><INDENT>condition_expression = element.firstChild.nodeValue<EOL>diagram_graph[source_ref][target_ref][consts.Consts.condition_expression] = {<EOL>consts.Consts.id: element.getAttribute(consts.Consts.id),<EOL>consts.Consts.condition_expression: condition_expression<EOL>}<EOL><DEDENT><DEDENT><DEDENT>'''<STR_LIT>'''<EOL>if consts.Consts.outgoing_flow not in diagram_graph.node[source_ref]:<EOL><INDENT>diagram_graph.node[source_ref][consts.Consts.outgoing_flow] = []<EOL><DEDENT>outgoing_list = diagram_graph.node[source_ref][consts.Consts.outgoing_flow]<EOL>if flow_id not in outgoing_list:<EOL><INDENT>outgoing_list.append(flow_id)<EOL><DEDENT>if consts.Consts.incoming_flow not in diagram_graph.node[target_ref]:<EOL><INDENT>diagram_graph.node[target_ref][consts.Consts.incoming_flow] = []<EOL><DEDENT>incoming_list = diagram_graph.node[target_ref][consts.Consts.incoming_flow]<EOL>if flow_id not in incoming_list:<EOL><INDENT>incoming_list.append(flow_id)<EOL><DEDENT>
Adds a new edge to graph and a record to sequence_flows dictionary.
Input parameter is object of class xml.dom.Element.
Edges are identified by pair of sourceRef and targetRef attributes of BPMNFlow element. We also
provide a dictionary, that maps sequenceFlow ID attribute with its sourceRef and targetRef.
Method adds basic attributes of sequenceFlow element to edge. Those elements are:

- id - added as edge attribute, we assume that this is a required value,
- name - optional attribute, empty string by default.

:param diagram_graph: NetworkX graph representing a BPMN process diagram,
:param sequence_flows: dictionary (associative list) of sequence flows existing in diagram.
    Key attribute is sequenceFlow ID, value is a dictionary consisting three key-value pairs: "name" (sequence
    flow name), "sourceRef" (ID of node, that is a flow source) and "targetRef" (ID of node, that is a flow target),
:param process_id: string object, representing an ID of process element,
:param flow_element: object representing a BPMN XML 'sequenceFlow' element.