-
Notifications
You must be signed in to change notification settings - Fork 122
Creating and using a custom generator
Kristian Karl edited this page Feb 21, 2020
·
5 revisions
The example project shows code where a custom generator is created. To use the new generator, it has been added to an example model SimpleModel.json, where the generator is referenced:
"generator": "pluginGenerator(edge_coverage(100))",
The custom generator needs to extend the GraphWalker class PathGeneratorBase<StopCondition>
See PluginGenerator.java.
To use the custom generator with GraphWlalker CLI or Studio, the new class needs to be added to the classpath:
mvn package
wget https://github.com/GraphWalker/graphwalker-project/releases/download/4.2.0/graphwalker-cli-4.2.0.jar
java -cp ./graphwalker-cli-4.2.0.jar:./target/java-plugin-generator-4.2.0-SNAPSHOT.jar org.graphwalker.cli.CLI offline -g src/main/resources/com/company/SimpleModel.json