Skip to content

Latest commit

 

History

History
167 lines (96 loc) · 6.92 KB

README.md

File metadata and controls

167 lines (96 loc) · 6.92 KB

Process Mining Tool for Event Graphs

This repository contains the Java project for a Process Mining tool that works on top of an Event Graph Database.

Specifications

  • IDE: IntelliJ IDEA 2019.3.3 (Community Edition)
  • Java:
    • jdk-13.0.1
    • java version "13.0.1" 2019-10-15
    • Java(TM) SE Runtime Environment (build 13.0.1+9)
    • Java HotSpot(TM) 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing)
  • Neo4j:
    • Version: 4.2.3
    • Edition: Community

How to Run

In this section we provide the instructions on how to run the project using IntelliJ IDEA 2019.3.3.

Update parameters

  1. Open the "Utils.java" file located on the following path: "src\EventGraphs" (starting from the main project folder).

  2. Update the parameters following 2 parameters:

    • NEO4J_BAT_PATH This path, specified in line 20 of the "Utils.java" file, is used to run the start command on Neo4j and enable the remote interface (available at http://localhost:7474/).

    Alt text

    • NEO4J_IMPORT_PATH This path, specified in line 21 of the "Utils.java" file, is used to indicate the Neo4j Import folder, where the CSV files must be placed to be imported into the graph database. The files shown in the next figure can be found in the "evaluation/" folder of this repository.

    Alt text

  3. Also in the "Utils.java" file, in lines 25 and 26, update the DEFAULT_USER and DEFAULT_PASS parameters if necessary.

Setup the Run Configuration

The main class of the application is the "EventGraphs.java" file, located in "src\EventGraphs". The steps to run the project from IntelliJ are shown next:

  1. Go to Run -> Edit Configurations

    Alt text

  2. On the window that appears, in the top-left corner, click on the "+" sign to add a new "Application" configuration.

    Alt text

  3. Set the following parameters:

    • Main class: EventGraphs.EventGraphs

    • VM options*:

      --module-path "C:\Java\javafx-sdk-15.0.1\lib" --add-modules javafx.controls,javafx.fxml

      *The JavaFX-SDK path may be different. For example, another valid path could be: "C:\Java\javafx-sdk-11.0.2\lib"

  4. The final Configuration should look similar to this:

    Alt text

  5. Clicking on the "Play" button should get the application started.

    Alt text

  6. If Neo4j has already been started, the following window will appear:

    Alt text

    Otherwise, the application will attempt to start Neo4j on the background and the window will show a different message when this is completed.

  7. If the Neo4j connection could be confirmed, closing the "Neo4j Connection Status" window will lead to the main window of the application.

Usage Example

Importing the Data

  1. Place the "Orders.csv" file in the NEO4J_IMPORT_PATH specified during the Run Configuration.

  2. In the user interface, go to File -> Upload CSV File

    1. Choose the "Orders.csv" file

    2. Choose "Action" as the "Activity" attribute and click on Continue.

      Alt text

    3. On the next window, choose all the attributes from the list (using Ctrl + click), anc click Next.

      Alt text

    4. On the next window, select the attributes "Delivery" and "Order" (in that order) and add them to the list on the right. Once both attributes are there, as seen in the figure below, click on Finish.

      Alt text

  3. On the "Logs" panel on the left of the user interface, select the recently uploaded log so its name appears on the top label.

    ![Alt text](./img/logsPanel.png)
    
  4. Go to the "Graph Data" panel and click on the Instance Level "View" button to visualize the Event nodes.

    1. Use the Mouse Scroll to zoom in or out of the Graph panel.
    2. Drag the mouse while pressing the Right Click to move around the Graph panel.

    Alt text

Creating Entities and Classes

  1. On the "Entities" panel, click on "New Entity".

  2. On the window that appears, select the "Order" attribute and click on Create Entity.

    Alt text

  3. If the "Entity Type Attribute Selection" window appears, click on Skip.

    Alt text

  4. Create a second entity type by repeating steps 1-3, this time selecting the "Delivery" attribute.

  5. On the "Entities" panel, click on "New Derived Entity".

  6. On the window that appears, select both entities on the list and click on Create Derived Entity.

    Alt text

  7. On the "Classes" panel, click on "New Class".

  8. On the window that appears, select both the "Activity" and the "Life-cycle" attributes and click on Continue.

    Alt text

  9. On the next window, select the "DeliveryOrder" entity and click on Create Class.

    Alt text

  10. Go to the "Graph Data" panel and click on the Model Level "View" button to visualize the Entity and Class nodes.

  11. To visualize the "directly follows" (:DF) paths, in the "Graph Data" panel, click on the "Edit" button next to the :DF/:CORR label.

  12. On the window that appears, select the "DeliveryOrder" entity and click Apply. This will indicate that their :DF relations will be included in the visualization.

    Alt text

  13. On the "Graph Data" panel, click on the Instance Level "View" button to visualize the Event nodes connected by the selected :DF relations.

    Alt text

Creating a Model

  1. On the "Algorithms" panel, select "Heuristic Miner" from the dropdown menu and click on Generate Model.

  2. On the window that appears, do the following:

    1. Make sure that the Class Type is "Activity+Life-cycle".
    2. Make sure that the Entity Type is "DeliveryOrder".
    3. Set the Dependency threshold at 0.6
    4. Click on Generate Model.

    Alt text

  3. To visualize the model, go to the "Models" panel, select the recently generated model (whose name should be "HM_1") and click on Show Model.

    Alt text

  4. To visualize the Petri net that represents that model, select the "HM_1" model and click on Show Petri Net.

    Alt text

Additional Notes

  • The input file used for the Python script "bpic17_prepare.py", which generates the data subsets included in the "evaluation/" folder of this repository, can be found in the website of the BPI Challenge 2017.
  • The graph visualizations used for this project were configured with the help of the GraphStream JavaFX Viewer library. For more information on this java library, visit the website http://www.graphstream-project.org/