This simple project uses the fantastic [PLG2](https://github.com/delas/plg) to generate completely randomized logs in batches and exports the process, the settings and the event log to a defined folder.
Using this project, you can easily generate multiple event log files.
Using this project, you can easily generate multiple event log files. You can also run/compile this program with Java 8 (Mvn -> Plugins -> exec -> exec:java), instead of simply running it.
## Setup
1. Download the PLG2 repository and compile it with maven (or put it your classpath somehow, so maven dependencies can access it).
...
...
@@ -8,7 +8,7 @@ Using this project, you can easily generate multiple event log files.
3. Adjust the class variables according to your needs.
4. Simply run main class.
---
## FAQ
F: Everything works, until the .xes file is beeing exported:
```
...
...
@@ -33,4 +33,8 @@ A: Make sure ``javax.xml.bind`` is in your classpath and dependencies.
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
```
\ No newline at end of file
```
---
F: Some Traces do not have events.
A: Use Java 8: https://github.com/delas/plg/issues/11
privatestaticfinalStringexportPath="/Path/to/your/folder/";// Define the folder where the files should be stored ("/" at the end is mandatory)
privatestaticfinalStringexportPath="/Users/chris/Documents/PLGTest/";// Define the folder where the files should be stored ("/" at the end is mandatory)
privatestaticfinalintnumberOfEventlogs=150;// Define how many event logs and processes you want to generate
// PROCESS DEFINITION
...
...
@@ -31,6 +35,7 @@ public class GenerateRandomBatchLog {
/*try (OutputStream out = new GZIPOutputStream(new BufferedOutputStream(Files.newOutputStream(new File(GenerateRandomLog.exportPath+processName+"-A"+processActivities+"-T"+logTraces+".xes.gz").toPath())))) {
try (OutputStream out = new GZIPOutputStream(new BufferedOutputStream(Files.newOutputStream(new File(GenerateRandomBatchLog.exportPath+processName+"-A"+processActivities+"-T"+logTraces+".xes.gz").toPath())))) {
new XesXmlSerializer().serialize(log, out);
} catch (IOException error) {
System.out.println("Error while writing the xes log file: " + error.getMessage());
...
...
@@ -140,10 +156,13 @@ public class GenerateRandomBatchLog {
}*/
XSerializerserializer=newXesXmlGZIPSerializer();
//XSerializer serializer = new XesXmlSerializer();
//generator.generateAndSerializeLog(serializer, new File(GenerateRandomLog.exportPath+processName+"-A"+processActivities+"-T"+logTraces+".xes.gz"));