This library allows you to parse an eventlog (as XES file) and generate a Camunda compatible BPMN model from it using the alpha algorithm.
The library is available on Maven Central and JCenter and can be used with Maven and Gradle.
<dependency>
<groupId>me.kingjan1999.fhdw</groupId>
<artifactId>alphacamunda</artifactId>
<version>1.0.4</version>
</dependency>
Alternatively, you can download the latest version on the releases page.
Use Parser.parse(InputStream)
to create a event log representation from a given InputStream with XES-Data:
Log log = Parser.parse(file.getInputStream())
Once you've got a log from the parser you can use the RelationBuilder
to build the necessary relations for executing the alpha algorithm like this:
RelationBuilder builder = new RelationBuilder();
builder.evaluate(log);
With the filled builder
you can use the BPMNCreator
to finally create the layouted BPMN Model:
BpmnModelInstance layoutedInstance = BPMNCreator.createAndLayout(algorithm);
Log log;
try {
log = Parser.parse(file.getInputStream());
} catch (JAXBException | XMLStreamException | IOException e) {
e.printStackTrace();
return;
}
RelationBuilder algorithm = new RelationBuilder();
algorithm.evaluate(log);
BpmnModelInstance layoutedInstance = BPMNCreator.createAndLayout(algorithm);