-
Notifications
You must be signed in to change notification settings - Fork 2
XES Importer
In this page the XES Importer is documented.
The XES_Importer is in the src.components.utils.xes_importer
module.
It provides differnt ways of importing XES event logs. Under the hood it uses in pm4py
importer 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)
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.
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_START
and 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.
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_START
and 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.
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_START
and 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.
importer = XES_Importer()
event_log, activities = importer.import_file('<my-path>')