def add_end_event_to_diagram(self, process_id, end_event_name="<STR_LIT>", end_event_definition=None, node_id=None):
end_event_id, end_event = self.add_flow_node_to_diagram(process_id, consts.Consts.end_event, end_event_name,<EOL>node_id)<EOL>end_event_definitions = {"<STR_LIT>": "<STR_LIT>", "<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT:message>": "<STR_LIT>", "<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT>": "<STR_LIT>", "<STR_LIT:error>": "<STR_LIT>"}<EOL>event_def_list = []<EOL>if end_event_definition == "<STR_LIT>":<EOL><INDENT>event_def_list.append(self.add_event_definition_element("<STR_LIT>", end_event_definitions))<EOL><DEDENT>elif end_event_definition == "<STR_LIT>":<EOL><INDENT>event_def_list.append(self.add_event_definition_element("<STR_LIT>", end_event_definitions))<EOL><DEDENT>elif end_event_definition == "<STR_LIT:message>":<EOL><INDENT>event_def_list.append(self.add_event_definition_element("<STR_LIT:message>", end_event_definitions))<EOL><DEDENT>elif end_event_definition == "<STR_LIT>":<EOL><INDENT>event_def_list.append(self.add_event_definition_element("<STR_LIT>", end_event_definitions))<EOL><DEDENT>elif end_event_definition == "<STR_LIT>":<EOL><INDENT>event_def_list.append(self.add_event_definition_element("<STR_LIT>", end_event_definitions))<EOL><DEDENT>elif end_event_definition == "<STR_LIT:error>":<EOL><INDENT>event_def_list.append(self.add_event_definition_element("<STR_LIT:error>", end_event_definitions))<EOL><DEDENT>self.diagram_graph.node[end_event_id][consts.Consts.event_definitions] = event_def_list<EOL>return end_event_id, end_event<EOL>
Adds an EndEvent element to BPMN diagram.
User-defined attributes:

- name
- event definition (creates a special type of end event). Supported event definitions
    * `terminate`: 'terminateEventDefinition', 
    * `signal`: 'signalEventDefinition', 
    * `error`: 'errorEventDefinition',
    * `escalation`: 'escalationEventDefinition', 
    * `message`: 'messageEventDefinition',
    * `compensate`: 'compensateEventDefinition'.

:param process_id: string object. ID of parent process,
:param end_event_name: string object. Name of end event,
:param end_event_definition: list of event definitions. By default - empty.
:param node_id: string object. ID of node. Default value - None.
:return: a tuple, where first value is endEvent ID, second a reference to created object,