The Activity Table Builder is a tool generate an activity table to demonstrate Process Mining to someone starting out in the field. It generates a simple activity table with sorting, case ID, activity, and timestamp.
If you are already signed up for Celonis, you can use the Machine Learning Workbench to build your activity table. Alternatively, you can also use an offline installation of Jupyter Notebook. If you are using an offline installation of Jupyter Notebook, it is recommended that you also have a spreadsheet editor available to you.
Before you start building a scenario, think about how you would like the scenario to look like. Some of the questions you would want to ask yourself are:
- What is the context behind the scenario?
- What are the possible activities that can happen when there are hundereds of instances of the scenario playing out?
- What is my 'happy path'?
- What are the possible variants?
- What other information you will need to build an analysis?
This tool exclusively builds activity tables. Since case tables can vary significantly between scenarios, it is recommended that each case table is build out to suit its intended purpose.
Go to Machine Learning in Data Integration.
Create a new Workbench.
The Workbench does not require any permissions to be granted to it.
Once the Workbench has been created, launch it and open the terminal.
Install the DateTime
package with pip
. Type the following in the terminal and press return.
pip install DateTime
All other dependencies are installed by default in the Workbench. However, if you are using an offline installation of Jupyter Notebook install the following packages:
pandas
numpy
random2
python-dateutil
Clone the repository into the Workbench. Use the following command in the terminal:
git clone https://github.com/celonis-content/ActivityTableBuilder.git
Once the repository has been cloned into the workbench, navigate to the ActivityTableBuilder folder. Open the file "activity_list.csv". It is a template for the input file.
If the file does not appear as the above picture, try changing the delimiter to ";".
If you have not downloaded a file from the Machine Learning Workbench previously, your first download will be an HTML file.
Open the file. It will redirect you to another webpage. Scroll down, check Don't show this again and click on Download File.
Try downloading the file again.
Either download the file on to your system or use the Editor in the Workbench.
If you download the file to edit it, delete the temnplate from the folder and upload the filled in file without renaming it.
Column 1: The first column is a list of all the possible activities that can happen during the process.
Minimum Duration & Maximum Duration: The second and third column denote the minimum and maximum time in hours an activity can take to be completed respectively.
END: This is a flag to denote whether an activity is a terminal activity, i.e., the process can end at that activity. If an activity is a terminal activity then the value is 100, otherwise 0.
Column 5 and beyond: These columns denote the probability of an activity in row 1 being following an activity in column 1. E.g.
If Activity 2 follows Activity 1 in 80% of the cases, then the entry at the intersection of Activity 1 in Column 1 and Activity 2 in Row 1 should be 80.
N.B.: Ensure that the sum of the entires in a row from 'END' (inclusive) onwards adds up to 100.
Once the "activity_list.csv" is filled up, open the "Run_ActivityTableBuilder.ipynb" file.
Move your cursor to the code block.
Run it by pressing Control+Return.
You only need to run one code block. Depending on the type of operation you are simulating, you can either run the first code block or the second code block. The first one simulates an operation that runs 24x7 (e.g. an electricity company). The second one simulates an operation which has limited working hours, specifically, Monday-Friday from 9 AM - 5 PM (e.g. a bank). This does not account for any holidays.
Enter the number of cases you want to generate.
Your activity table should be generated. It will appear in the file explorer in the Workbench.
The template file uses ";" as the delimiter in the CSV file. If you use an offline spreadsheet tool to edit the template, make sure to check whether the demiliter matches between the code and file.
The cell of the activity table generated at the 1st row, 1st column is empty. This will result in an error when uploading the the EMS using Upload Files option in a Data Pool. Rename this cell to "Sorting".
The program is dependent on the template being maintained. Changing the layout of the Activity List file will result in the program not working as expected.