A Leiningen plugin for visualizing Clara rule data flow.
Clara Rule Engine is a super cool project. But sometimes the data flow can get messy due to the high number of rules and facts. This project helps you visualize your data flow in order to catch bugs more efficiently.
- Clone this repo somewhere
git clone https://github.com/erdos/claravis
- Go to repo directory and install mvn dependency:
$ lein install
- Add the following to the
:plugins
section of yourproject.clj
file:[claravis "0.1.0-SNAPSHOT"]
- Make sure Graphviz is installed in your system.
- In the project folder execute the command:
$ lein claravis my.namespace.core output.png
- See the generated graph in the
output.png
file.
Pro tip: you can add the plugin to your ~/.lein/profiles.clj
instead of project.clj
if you wish to use it across multiple projects.
This is the generated example for the clara.examples.shopping
namespace of
the Clara Examples repository.
The tabular data are the facts and the brown boxes are the rules. You can see the queries at the bottom.
Copyright © 2017 Janos Erdos
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.