Skip to content

Creating event logs

ceciliaiacometta edited this page Apr 17, 2024 · 6 revisions

Using MINERful to create synthetic event logs

MINERful can be used also to create event logs that comply with a given declarative workflow specification. There are two ways to do that: either via command line, or using MINERful as a Java package to be integrated in your software project.

Creating event logs via command line

Suppose you have a declarative process specification as follows:

{ "name": "Admission to university process",
  "constraints": [
				 {"template": "init", "parameters":[["Create a candidate account"]]},
				 {"template": "atmost1", "parameters":[["Create a candidate account"]]},	
				 {"template": "precedence", "parameters": [["Create a candidate account"],["Register for selection round"]]},
				 {"template": "alternatesuccession", "parameters": [["Register for selection round"],["Enter evaluation phase"]]},
				 {"template": "precedence", "parameters": [["Upload admission test score"],["Enter evaluation phase"]]},
				 {"template": "alternateprecedence", "parameters": [["Enter evaluation phase"],["Receive rejection notification"]]},
				 {"template": "alternateprecedence", "parameters": [["Enter evaluation phase"],["Receive admission notification"]]},
				 {"template": "notresponse", "parameters": [["Receive admission notification"],["Receive rejection notification"]]},
				 {"template": "precedence", "parameters": [["Receive admission notification"],["Pre-enrol in the program"]]},
				 {"template": "atmost1", "parameters":[["Pre-enrol in the program"]]},	
				 {"template": "precedence", "parameters": [["Pay subscription fee"],["Pre-enrol in the program"]]},
				 {"template": "chainresponse", "parameters": [["Pay subscription fee"],["Pre-enrol in the program"]]},
				 {"template": "precedence", "parameters": [["Pre-enrol in the program"],["Enrol in the program"]]},
				 {"template": "precedence", "parameters": [["Upload certificates"],["Enrol in the program"]]},
				 {"template": "atmost1", "parameters": [["Enrol in the program"]]}
] }

Let us assume this file is saved in /home/claudio/Desktop/uniexampleprocess.json. To generate an event log consisting of 2000 traces, the length of whose traces is between 2 and 24 tasks, and store it in XES format in /logs/uniexamplelog.xes, run the following command

run-MINERfulEventLogMaker.sh --input-specification-file '/home/claudio/Desktop/uniexampleprocess.json' --input-specification-encoding json  --size 2000 --minlen 2 --maxlen 24 --out-log-encoding xes --out-log-file '/logs/uniexamplelog.xes'

The same result can be achieved with a shorthand notation for passing parameters:

run-MINERfulEventLogMaker.sh -iSF '/home/claudio/Desktop/uniexampleprocess.json' -iSE json -oLL 2000 -oLm 2 -oLM 24 -oLE xes -oLF '/logs/uniexamplelog.xes'

The rationale for those abbreviations is that the parameter prefixes pertain to the context: -iS for the input Specification, -oL for the output (event) Log.

Moreover, it is possible to create event logs with partial conformity by means of adding a file specifying the constraints to be negated and the number of traces in which the negation should occur. To generate an event log consisting of 2000 traces, the length of whose traces is between 2 and 24 tasks, and store it in XES format in /home/claudio/Desktop/uniexamplelognoisy.xes in which 500 traces violate the negated constraints written in /home/claudio/Desktop/constraints.json, run the following command

run-MINERfulEventLogMaker.sh --input-specification-file '/home/claudio/Desktop/uniexampleprocess.json' --input-specification-encoding json  --size 2000 --minlen 2 --maxlen 24 --out-log-encoding xes --out-log-file '/home/claudio/Desktop/uniexamplelognoisy.xes' --sizeneg 500 --neg-const-file '/home/claudio/Desktop/constraints.json'

The same result can be achieved with a shorthand notation for passing parameters:

run-MINERfulEventLogMaker.sh -iSF '/home/claudio/Desktop/uniexampleprocess.json' -iSE json -oLL 2000 -oLm 2 -oLM 24 -oLE xes -oLF '/home/claudio/Desktop/uniexamplelognoisy.xes' -oLN 500 -iNC '/home/claudio/Desktop/constraints.json'

As usual, to have an overview of the parameters, their meaning and their default, you can run:

run-MINERfulEventLogMaker.sh -h

Indeed one can use other formats for the output log (for instance, the MXML old process mining input format or you can use '--out-log-encoding strings' to save it as a text file). Because the event log is for all means and purposes a full-fledged XES event log, you can run the discovery algorithm of MINERful to see what specification comes out. This turns out to be very useful for testing purposes:

run-MINERful.sh -iLF '/home/claudio/Desktop/uniexamplelog.xes'

Creating event logs via API

Publications

For more information on how the log generator works, or how it has been used, feel free to refer to the following publications: