Mastering JBoss Drools 6 for Developers () by Mauricio Salatino, Mariano De Maio, Esteban Aliverti. Drools JBoss Rules 5.X Developer’s Guide (). Final. Guvnor documentation Mastering JBoss Drools 6 for Developers () by Mauricio Drools JBoss Rules Developers Guide () by Michal Bali. Documentation for Drools Final. documentation Reference manual Drools Final: HTML Single. documentation User Guide Final: PDF.
|Published (Last):||23 November 2007|
|PDF File Size:||5.21 Mb|
|ePub File Size:||8.21 Mb|
|Price:||Free* [*Free Regsitration Required]|
This section introduces Guvnor. See the other relevant sections for installation, usage and administration. A business rules manager allows people to manage rules in a multi user environment, it is a single point of truth for your business rules, allowing change in a controlled fashion, with user friendly interfaces.
Guvnor is the name of the web and network related components guvno managing rules with drools. Dlcs combined with the core drools engine and other tools forms the business rules manager. You should consider Guvnor if any of the following apply to you: Guvnor can be “branded” and made part of your application, or it can be a central rule repository.
In some situations applications may exist which have the rules in a database for instance as part of an existing applicationand no new application is needed to manage the rules. In this case, the drools-template library is worth a look – you droolss define templates for rules to be generated from any tabular data source.
Otherwise, perhaps an existing rule management system and user interface already exists and is tailored to your environment already – in this case migrating to Guvnor may not be necessary. If you are using rules to solve complex algorithmic problems, and the rules are essentially an integral part of the application and don’t need to be managed separately to the code. The main roles of people who would use Guvnor are: Business Analyst, Rule expert, Developer, Administrators rule administrators etc.
Guvnor is designed in such a way as these different roles can be accommodated, it can be controlled how much is exposed to different users in a safe fashion. If you are reading this, crools 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 dfools 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 ugvnor 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 supported server side platforms are mentioned in the installation guide. For browsers – the major ones are supported, this includes Firefox 1.
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:. Vrools deployed, go to http: Add a few categories of your choosing, categories are only for classification, not for execution or anything else and are optional, but recommended.
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 drolos suitable name. Rules need a fact model object model to work. The model defines your domain artifacts representing the knowledge you wish to manage.
Enter a suitable name and ensure the package you defined above is selected in the “Create in package” dropdown.
At this point, the package is configured and ready to go you generally won’t have to go through guvnoe step very often. Note that you can also import an existing DRL package – it will store the rules in the repository as individual assets.
There are different types of gunvor that can be authored but for simplicity we will demonstrate a new “Guided Rule”. 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 droole changes saveor you can validate or “view source” for the effective source. 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 droolw a sensible droosl 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.
rest – How to deploy rules from Drools Guvnor – Stack Overflow
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: As the Guvnor can manage many different types of rules and morethey are all classed as “assets”.
An asset is anything that can be stored as a version in the repository. This includes drooks tables, models, DSLs and more. Sometimes the word “rule” will be used to really mean “asset” i. You can think of asset as a lot like a file in a folder. Assets are grouped together for viewing, or to make a package for deployment etc. Packages form a deployable unit containing assets and once a package has been built it itself becomes an asset. The Global Area is a special type of package that contains assets that can be shared in other packages.
Shared assets are linked to those in the Global Area. You can see from this manual, that some expertise and practice is required to use Guvnor.
In fact any software system in some sense requires that people be “technical” even if it has a nice looking GUI. Having said that, in the right hands Guvnor can be setup to provide a suitable environment for non technical users. The most cocs rule formats for this use are using the Guided editor, Decision tables and DSL rules. You can use some DSL expressions also in the guided editor so it provides “forms” for people drpols enter values.
You can use categories to isolate rules and assets from non technical users.
Only assets which have a category assigned will appear in the “categories” view. They may also create “templates” which are rules which may be copied they would typically live in a “dummy” package, and have a category of “template” – this can also help ease the way. Deployment should also not be done by non technical users as mentioned previously this happens from the “Package” feature.
In most cases not all users will want to see all the functionality described here. You could have a subset of users who you only want to let view or dics certain sets of rules, without getting confused by all the other stuff.
In this case you can use fine grained authorization see the Admin Guide on how to initialize this. By setting permissions on a per category basis, users that only have category permissions will see a limited subset focs functionality, and only items that are tagged with those categories.
Both assets and whole packages of assets are “versioned” in the Guvnor, but the mechanism is slightly different. Individual assets are saved a bit like a version of a file in a source control system.
However, packages of assets are versioned “on demand” by taking a snapshot typically which is used for deployment. The next section talks about deployment management and snapshots. Each time you make a change to an asset, it creates a new item in the version history. This is a bit like having an unlimited undo. You can look back through the history of an individual asset like the list above, and view it and restore it from that point in time.
It consists of two tabs: It is encouraged, but not mandatory, to record a description of the Asset before editing. The Asset editor is where the “editor widget” lives – exactly what form the editor takes depends on the Asset type.
These are menus contains various actions for the Asset; such as Saving, Archiving, changing Status etc. Generally speaking, very few people will need to configure packages, and once they are setup, they dtools be copied over and over if needed. Package configuration is most guvnir a technical task that requires the appropriate expertise. All assets live in “packages” in the Guvnor – docd package is like a folder it also serves as a gvnor.
A home folder for rule assets to live in.
Rules in particular need to know what the fact model is, what the namespace is etc. So while rules and assets in general can appear in any number of categories, droools only live in one package. If you think of the Guvnor as a file system, then each package is a folder, and the assets live in that folder – as one big happy list of files.
When you create a deployment snapshot of a package, you are drpols copying all the assets in that “folder” into another special “folder”.
It is also possible to create a package by importing an existing DRL file. When you choose to create a new package, you can choose an option to upload a. The Guvnor will then attempt to understand that DRL, break eocs a package for you.
The rules in it will be stored as individual assets but still as DRL text content. Note that to actually build the package, you will need to upload an appropriate model as a JAR to validate against, as a separate step. This textual editor allows you to define Drools and potentially any Spring context file. These files are later accessible through HTTP. The editor comes with a basic pallete that you can use to paste predefined Spring Beans templates like kbases, ksessions and so on.
The pallete also has a Package tree that can be used to add resources to the Spring Context file being edited. Working Sets are a mean for grouping Facts and then defining constraints on them. You can create groups of Facts and only those Facts will be visible when authoring rules using the Guided Editor. Right now, Working Sets must be activated manually from the Guided Editor window using the “Select Working Set” button placed in the toolbar.