Raviteja Avvari's picture

Dear Process Mining user, 

Have you checked out our new capabilities in ARIS Process Mining specially made with you in mind? Now you can code 😊

We know mining from the comfort of your home turf significantly boosts the time to value and increases your flexibility in defining new measures and dimensions, even ad-hoc from the app builder. In case you have not come across it yet, I strongly encourage you to try out the feature and to assist along the way, I have compiled a few examples that will give you a jump start, and keep sharing with you in the coming days. 

Scenario #1: Calculate the time between 2 process steps. 

Have wondered how to simply see the throughput time between any two activities in the process? 


Is it possible to simply calculate columns runtime basis user input? 

Among many other questions... 

The answer is “Yes”. You can do it now!!! 

Below, I have created a small example where we are trying to know the throughput time between 2 activities in a process chosen by the user and with this, I attempt to guide you into our code editor. 

Assume you already have loaded the data and can see the explorer, let us add an “App Builder”, that exactly tells us about the time between 2 selected activities in the process. Of course, this time can be presented over many aggregations from average, min, max, median among many other possibilities.  

As a first step, let us add an input component with 2 drop-down in it and each drop down showing the steps inside the process by assigning the “Activity Name” field to each drop down. We use this to select the “From Activity” and “To Activity” for calculating the time between steps. To see the result, we add a label component where we can see the time between the selected steps.  

Because the user can select any combination of steps in the process, to calculate the time on demand, let us store the selection in 2 variables, one consisting of “From Activity” and the other consisting of “To Activity” and assign the respective variables in the Input widget configuration. Variables can be created from the burger menu on the top. Simply click on the variables and create. The default can be left null or any initial value among the possible drop down choices. The values are case sensitive.


To see the value in the label component, lets add a measure and now you can see that along with selecting from the existing columns, you can now create a column on-demand from the “+New field” placed conveniently at the top for easier access.  


When you click on the new field, you can choose between case or activity column that you want to create. In our case, it’s a case column and when you select case column, now you see the newest addition,  



When you select the code editor, you’ll instantly feel at home and the field is all yours to play around. For the scenario we are solving let’s input the below code snippet   

TO_LONG ((ACTIVITY_PU_FIRST ("_ARIS.Activity"."Activity start time","_ARIS.Activity"."Activity Name"=${To_ACTIVITY}))) - 

TO_LONG (ACTIVITY_PU_FIRST ("_ARIS.Activity"."Activity start time","_ARIS.Activity"."Activity Name"=${From_ ACTIVITY})) 

Because we are calculating the time between the activities in the process, we include the first occurrence of the activity in each case and consider its start time. Hence the part of the snippet 

ACTIVITY_PU_FIRST ("_ARIS.Activity"."Activity start time") 

And, because we are receiving the activities from the user during the run time, we specify the activity name through the parameters we see in the snippet i.e., ${To_ ACTIVITY} and ${From_ ACTIVITY}. This is the parameter that takes the value from the variable’s values containing the activities selected by the user.  

To create and use each of these parameters we click on the open parameters shown below. 

And click on “Add”. You can keep the default value to any activity of your choice (Beware of case sensitivity and spaces) NULL or as this will be provided by the user in the later steps.  

Once the parameters are defined, to perform a mathematical operation of subtraction, we convert the values from the fields into numbers by using TO_LONG 

Once the value is derived, we need to change the formatting to Timespan as the result is indicating a duration and you can choose between hours or days or weeks among many other possibilities as a notation 

After you create the column, you can now see newly created column to be selected in the list.  

Select the column and because this column definition has 2 parameters, we assign the 2 variables to respective parameters which we defined earlier and chose an aggregation of choice. 

Click on done and choose between any number of combinations to instantly see the result. 😊 

Happy Process Mining!

This is a small example of the great possibilities to leverage the new code editor.  

See you soon with another scenario. 

Tags: Process Mining script