https://github.com/tom-tan/medal
A workflow engine based on Petri nets
https://github.com/tom-tan/medal
petri-nets workflow-engine
Last synced: 3 months ago
JSON representation
A workflow engine based on Petri nets
- Host: GitHub
- URL: https://github.com/tom-tan/medal
- Owner: tom-tan
- License: apache-2.0
- Created: 2020-01-19T17:24:53.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-01-16T02:35:07.000Z (over 3 years ago)
- Last Synced: 2025-02-01T09:13:12.892Z (5 months ago)
- Topics: petri-nets, workflow-engine
- Language: D
- Homepage:
- Size: 375 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Medal
[](https://github.com/tom-tan/medal/actions) [](https://github.com/tom-tan/medal/blob/master/LICENSE)This is a workflow engine based on Petri nets.
## Usage
```console
$ 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.
```console
$ ./bin/medal --help
Medal: A workflow engine based on Petri nets
Usage: ./bin/medal [options]
-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 transition
- `network` shows how to write a network
- `passthrough` shows how to pass a token in a place to other placesYou can visualize a given network by using `net2dot.d` with the following commands:
```console
$ ./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.
## For developers
### Build requirements
- D compiler (ldc 1.27.0, dmd 2.097.0 or later)
- dubor
- Docker (only for Linux)
### How to build
```console
$ git clone https://github.com/tom-tan/medal.git
$ cd medal
$ dub build -b release
```or
```console
$ 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.
### How to dive into source codes
```console
$ dub run gendoc
```You will see API documents (HTML) in `docs` directory.