This is a workflow engine based on Petri nets.
$ medal examples/network.yml -i examples/network-input.ymlIt requires a file that describes a network (workflow) and a file that specifies the initial marking (optional).
See medal --help for more details.
$ ./bin/medal --help
Medal: A workflow engine based on Petri nets
Usage: ./bin/medal [options] <network.yml>
-i --init Specify initial marking file
--quiet Do not print any logs
--debug Enable debug logs
--log Specify log destination (default: stderr)
-h --help This help information.The examples directory shows several examples.
Each directory contains network.yml for a network and init.yml for initial marking.
transitionshows how to write a transitionnetworkshows how to write a networkpassthroughshows how to pass a token in a place to other places
You can visualize a given network by using net2dot.d with the following commands:
$ ./net2dot.d examples/network/network.yml output.dot # dub is required
$ dot -T pdf output.dot -o network.pdf # Graphviz is requiredNote: syntax is not fixed yet.
- D compiler (ldc 1.27.0, dmd 2.097.0 or later)
- dub
or
- Docker (only for Linux)
$ git clone https://github.com/tom-tan/medal.git
$ cd medal
$ dub build -b releaseor
$ git clone https://github.com/tom-tan/medal.git
$ cd medal
$ docker run --rm -v ${PWD}:/medal --workdir=/medal dlang2/ldc-ubuntu dub build -b releaseYou will see medal in bin directory.
$ dub run gendocYou will see API documents (HTML) in docs directory.