Skip to content

Latest commit

 

History

History
59 lines (45 loc) · 1.89 KB

README.md

File metadata and controls

59 lines (45 loc) · 1.89 KB

Alpha Algorithm for Camunda

Maven Central Build Status

This library allows you to parse an eventlog (as XES file) and generate a Camunda compatible BPMN model from it using the alpha algorithm.

Get

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.

Usage Example

Parser

Use Parser.parse(InputStream) to create a event log representation from a given InputStream with XES-Data:

Log log = Parser.parse(file.getInputStream())

RelationBuilder

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);

BPMNCreator

With the filled builder you can use the BPMNCreator to finally create the layouted BPMN Model:

BpmnModelInstance layoutedInstance = BPMNCreator.createAndLayout(algorithm);

Complete Example

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);