Skip to content

Process-Discovery-Log-Skeleton/Log-Skeleton-Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Log-Skeleton-Backend

Status

GitHub pull requests GitHub issues

πŸ“„ Documentation

The project provides a documentation in the GitHub Wiki page of this project.

It covers different topics like:

πŸ‘·β€β™€οΈ Installation & Setup

This project requires python version < 3.9.x (some requirements are not compatible with 3.9.x).

To install the required dependencies use the following commands:

🐍 Download and install python 3 (lower than python 3.9).

🚨 Install flake8 as for linting:

pip install flake8 flake8-docstrings

βœ… Install pytest for unit testing.

pip install pytest

🌐 Install flask for the REST-API server.

pip install flask

πŸ“ˆ Install pm4py for some process discovery helpers.

pip install pm4py

πŸš€ Starting the API server

To start the application run:

python -m src.api.server

This command will start a HTTP server for the API.

🌐 Using the API

🎯 Endpoints:

/log-skeleton

This HTTP endpoint will accept an XES event log as the input and return a log-skeleton model based on that model.

Provide an XES event-log in the body of the request for the server.

πŸ”§ Parameters:
  • noise-threshold: Number between 0 and 1 to specitfy a noise_threshold for the algorithm.
  • extended-trace: Boolean value indicating whether the trace extension will be included or not.
πŸ“¦ The API-Response:

In case the API gets used as it is inteded to be, it will return a JSON object containing the following items:

  • always-after: Contains a list of tuples representing the always-after relationship.
  • always-before: Contains a list of tuples representing the always-before relationship.
  • equivalence: Contains a list of tuples representing the equivalence relationship.
  • never_together: Contains a list of tuples representing the never_together relationship.
  • next_one_way: Contains a list of tuples representing the next_one_way relationship.
  • next_both_ways: Contains a list of tuples representing the next_both_ways relationship.
  • counter: Contains a JSON object representing the counter relationships.
  • parameters: Contains a JSON object indicating the parameters applied and further information like IDs of the trace start and trace end.
⛔️ Error codes

In case of an error the API will respond with the appropriate HTTP error code. Further an error description will be provided in the response in the error_msg field.

Examples

The following example will return a log skeleton model for the given log in the body with a noise threshold of 3%. https://<domain>/log-skeleton?noise-threshold=0.03

The following example will return a log skeleton model for the given log in the body with a noise threshold of 10% and it will include the extended traces. https://<domain>/log-skeleton?noise-threshold=0.1&extended-trace=true

The following example will return a 404 error since there is no route called /log-skleeton. https://<domain>/log-skleeton?noise-threshold=0.1