This is a workflow engine based on Petri nets.
$ medal examples/network.yml -i examples/network-input.yml
It 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.
transition
shows how to write a transitionnetwork
shows how to write a networkpassthrough
shows 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 required
Note: 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 release
or
$ 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 release
You will see medal
in bin
directory.
$ dub run gendoc
You will see API documents (HTML) in docs
directory.