JBoss.orgCommunity Documentation
If you are reading this, you must be the impatient type who wants to kick the tires (and light the fires) and have a look around as soon as possible. This section will provide a quick end to end tour of the steps involved (but does not go through the concepts in detail). This assumes you have installed the repository correctly, and are able to access the main login screen.
You can also consult the wiki for some tutorials and user tips (it IS a wiki, so you can even contribute your own tips and examples and even upload files if you desire !).
The above picture shows the main feature areas of Guvnor.
Info: This is the initial screen, with links to resources.
Rules: This is the category and business user perspective.
Package: This is where packages are configured and managed.
Deployment: this is where deployment snapshots are managed.
Admin: Administrative functions (categories, statuses, import and export)
The supported server side platforms are mentioned in the installation guide. For browsers - the major ones are supported, this includes Firefox (1.5 and up), IE7 and up, Opera, Safari, Google Chrome etc. The preferred browser for most platforms is Firefox, it is widely available and free, if you have any choice at all, Firefox is the preferred platform, followed by safari on mac. IE6 users can experience some poor performance, and as this is a dangerously insecure browser IE7 or a superior browser (such as Google Chrome, Firefox, Safari) is recommended.
Some initial setup is required the first time. The first time the server starts up, it will create an empty repository, then take the following steps:
Once deployed, go to http://localhost:8080/guvnor-6.0.0.CR3/ This will show the initial info screen or login screen depending on the configuration.
If it is a brand new repository, you will want to go to "Admin", and choose "Manage Categories"
(Add a few categories of your choosing, categories are only for classification, not for execution or anything else and are optional, but recommended).
Rules and other assets belong to a Package, a container for related artifacts.
Select the "Knowledge Bases" section of the menu-bar on the left-hand side of the Guvnor main window.
Click on "Create New" to show the types of asset that can be created and select "New Package". Click on "Create new package" and enter a suitable name.
Click "Create package".
Rules need a fact model (object model) to work. The model defines your domain artifacts representing the knowledge you wish to manage.
Select the "Knowledge Bases" section of the menu-bar on the left-hand side of the Guvnor main window.
Click on "Create New" and select "Upload POJO model JAR" (if you have a JAR containing your Java model).
Enter a suitable name and ensure the package you defined above is selected in the "Create in package" dropdown.
Click OK
The POJO Upload screen is displayed.
Click on "Browse" and select your JAR file.
Click on "Upload".
At this point, the package is configured and ready to go (you generally won't have to go through that step very often).
(Note that you can also import an existing DRL package - it will store the rules in the repository as individual assets).
Select the "Knowledge Bases" section of the menu-bar on the left-hand side of the Guvnor main window.
Click on "Create New" and select the type of rule you want to create.
(There are different types of rule that can be authored but for simplicity we will demonstrate a new "Guided Rule").
Chose "New Rule".
Enter a suitable name and ensure the package you defined above is selected in the "Create in package" dropdown.
(You can optionally assign the default "Category" to the rule at this stage too).
Select "Business Rule (guided editor)" in the "Type (format) or rule" dropdown.
Click "OK".
The Guided Rule Editor will open. It represents a single DRL rule. You can add and edit Conditions and Actions using the model, or models, that are available in the package.
When you are done with rule editing, you can check in the changes (save), or you can validate or "view source" (for the effective source).
You can also add/remove categories from the rule editor, and other attributes such as documentation (if you aren't sure what to do, write a document in natural language describing the rule, and check it in, that can also serve as a template later)
In terms of navigating, you can either use the Rules feature, which shows things grouped by categories, or you can use the Package feature, and view by package (and rule type). If you know the name or part of the name of an asset, you can also use the "Quick find", start typing a rule name and it will return a list of matches as you type (so if you have a sensible naming scheme, it will make it very quick to find stuff).
After you have edited some rules in a package, you can click on the package feature, open the package that you wish, and build the whole package.
If that succeeds, then you will be able to download a binary package file which can be deployed into a runtime system.
You can also take a "snapshot" of a package for deployment. This freezes the package at that point in time, so any concurrent changes to not effect the package. It also makes the package available on a URL of the form: "http://<your server>/guvnor-webapp/org.drools.guvnor.Guvnor/packages/<packageName>/<snapshotName>" (where you can use that URL and downloads will be covered in the section on deployment).