Skip to content

XES Importer

Jonah Schüller edited this page Dec 5, 2020 · 1 revision

XES Importer

In this page the XES Importer is documented.

General

The XES_Importer is in the src.components.utils.xes_importermodule. It provides differnt ways of importing XES event logs. Under the hood it uses in pm4pyimporter for importing files.

The supported importing types are:

  • From a path
  • From a string
  • From a flask-HTTP-Request (XES event log must be attached in the body of the request)

Constants

TRACE_START

The TRACE_START is a placeholder activity that can be attached to the beginning of every trace in the event log.

TRACE_END

The TRACE_END is a placeholder activity that can be attached to the end of every trace in the event log.

It might be useful to use these since they provide a way of indicating starts and ends in the activity graphs.

Methods

import_file(path: str, extended_trace=True)
def import_file(self, path: str, extended_trace=True):

This method provides a way of importing an XES event log from an absolute path to the file. The extended_trace flag indicates whether the traces will be extended by the. TRACE_STARTand TRACE_END activities. The method returns a tuple containing the imported event log as a list of lists containing the activities and a list of all occuring activities in the log.

import_str(path: str, extended_trace=True)
def import_str(self, event_log: str, extended_trace=True):

This method provides a way of importing an XES event log from a string. The extended_trace flag indicates whether the traces will be extended by the. TRACE_STARTand TRACE_END activities. The method returns a tuple containing the imported event log as a list of lists containing the activities and a list of all occuring activities in the log.

import_http_query(path: str, extended_trace=True)
def import_http_query(self, request, extended_trace=True):

This method provides a way of importing an XES event log from a http-request from the flask framework. The extended_trace flag indicates whether the traces will be extended by the. TRACE_STARTand TRACE_END activities. The method returns a tuple containing the imported event log as a list of lists containing the activities and a list of all occuring activities in the log.

Examples

importer = XES_Importer()

event_log, activities = importer.import_file('<my-path>')