Skip to content

bpm-diag/SCAN

Repository files navigation

SCAN - Segments Compliance ANalysis

Description

Segments Compliance ANalysis is a tool that helps users to identify all the potential behaviors (i.e., segments) of the routines of interest directly from an event log. It allows you to load the interested event log (in the XES format) and filter out those segments not allowed by any real-world routine behavior, by using the DECLARE constraints. Such constraints describe the temporally extended relations between the activities that must be satisfied throughout a segment (e.g., an activity a1 must be eventually followed by an activity a2). Finally, when you have identified and removed those segments that should not be compliant with any real-world routine behavior, you can export the resulting event log.

Table of content

  1. How to install
  2. How to use

How to install

For the installation of the tool you need:

  1. Python (version 3.9):
  2. Download the zip folder of the project: https://github.com/bpm-diag/SCAN (press on Code and then on Download ZIP).

When you are installing python remember to check the flag 'ADD TO PATH'
Add to path in python installation

Alternatively, you can set it manually as follows:

  1. Write in the search part of your bottom navigation bar "system environment" and click on the suggested "Edit system environment variables".
  2. Click on button "Environment variables".
  3. In the second section "System variables" search for the "Path" variable and then click on "Edit".
    Here you need to write the path of your python folder that has the following form: C:\Users<nome_utente>\AppData\Local\Programs\Python<python_version>\Scripts
    To be sure to write the correct path navigate in your folders following the path until the folder Scripts included. Here copy your path and come back to the environment variables.
  4. Now, click on "New" and copy the path found and then click "Ok" to save.
  5. At the end, click again "Ok" to get out from the environment variable section.

After you have installed python, unzip the project and open the terminal of your computer and locate the project folder. So, inside the project folder type the following commands: pip install -r requirements.txt
python main.py

If you are encountering errors in running the previous commands, run these lines:

For Windows:
py -3 -m venv .venv
.venv\scripts\activate
pip install -r requirements.txt
python main.py

For Linux / macOS:
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
python main.py

At this point you can open your preferred browser between Firefox, Google Chrome, Microsoft Edge and Opera to view the tool. Type in the url bar:
127.0.0.1:5000

N.B.: For a better experience it is suggested to use Firefox.

Now you are ready to use SCAN!

How to use

Select your .xes event log file from a folder of your choice via the BROWSE button, then continue with UPLOAD.

You can now view the segments in the SEGMENTS' LIST section on the left.
You can use the HIDE/SHOW button to change the display of segments. If the button is set to HIDE by clicking on a row of the table you will be shown a pop-up that will show the content of the segment.

Visualize segments after upload file

Visualize segments in Hide modality

The segments are shown by default in ascending order following the number of occurrences. You can reverse the order by clicking on the button ASCENDING/DESCENDING and view them as you prefer.

On the right you can choose the DECLARE constraints you want to apply. Select the constraint and the activities to apply it to. If you do not remember the operation of a constraint click on i which shows an informative box. All the constraints applied are visible in the LIST OF CONSTRAINT section and you can delete one at a time using the TRASH button.

Apply DECLARE constraints and visualize in DESCENDING order

Each time you apply a new constraint, segments that do not satisfy it are moved to the NOT ACCEPTED SEGMENTS' LIST section.

After deletion of constraint

If you are not satisfied with your work you can click on the CLEAR button and start again from the beginning by loading a new file.

Otherwise, when you are satisfied with the results achieved, you can download the .xes file, by using the EXPORT button, and save it wherever you want.

Export of file

Thus, the output of the tool consists in:

  • a .xes event log file which stores the segments that satisfy the list of DECLARE constraints you chose;
  • log_timestamp.txt file that is created every time you upload a .xes event log file within the tool. This file logs all the steps you have performed during your run, i.e.: each constraint you applied/deleted, the different buttons you clicked, etc... These files are available inside the timestamp folder of the project.

For a video demonstration of the tool please refer to the following link: https://tinyurl.com/demo-tool

Sample log available for download: https://tinyurl.com/sample-log

About

SEgments ComplianT

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published