New Plug-in: Split traces

Problem setting

Assume you have the following CSV file as input:

and that you want the following CSV file as output:

That is, we want to use the value of the Split attribute to split the trace on, where we assume the values of the attribute to be white-space separated lists of subvalues. Every trace needs to be split into as many traces as there are subvalues for the attribute in the trace, that is, for every subvalue a trace is created containing (1) all events that do not contain this attribute and (2) all events that have this subvalue in the value for the attribute.

Solution in ProM

You need to have version 6.5.231 (or better) of the Log package installed for this.

First step: Importing the CSV file

Import the CSV file containing the input using the CSV File (XES Conversion with Log package) import plug-in. This results in a CSVFile object.

Second step: Converting the CSV file to a XES log

On the imported CSVFile object, start the Convert CSV to XES action. Select Next in the first dialog panel. In the second dialog panel, set the date format manually to dd/MM/yy H:mm, as this is the format used in the input. Then select Next. Select Finish in the third dialog panel. This runs the action, which results in an XLog object, containing a single trace.

Third step: Splitting the traces

On the created XLog object, start the topmost Split traces action, as this allows you to select the Split attribute. In the dialog panel, select the Split attribute key. Then select Finish. This runs the action, which results in a second XLog object, containing three traces.

Fourth step: Exporting the XES log to CSV file

In the workspace view, select the topmost XLog object, labeled Log containing splitted traces. Then select the Export to disk button. In the Save dialog panel, choose a folder and a name for your file, but keep the CSV files type. When done, select the Save button. Your log containing the splitted traces will be exported to a CSV file as shown above.