This section introduces the 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 for managing rules with drools. This combined with the core drools engine and other tools forms the business rules manager.
|Published (Last):||5 September 2018|
|PDF File Size:||5.79 Mb|
|ePub File Size:||8.17 Mb|
|Price:||Free* [*Free Regsitration Required]|
This section introduces the 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 for managing rules with drools. This combined with the core drools engine and other tools forms the business rules manager.
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 application , and no new application is needed to manage the rules.
In this case, the drools-template library is worth a look - you can 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, 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 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:. 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. Rules need a fact model object model to work off, so next you will want to go to the Package management feature.
From here you can click on the icon to create a new package give it a meaningful name, with no spaces. To upload a model, use a JAR which has the fact model API that you will be using in your rules and your code go and make one now if you need to! When you are in the model editor screen, you can upload a JAR file, choose the package name from the list that you created in the previous step.
Now edit your package configuration you just created to import the fact types you just uploaded add import statements , and save the changes. 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.
There are multiple rule "formats", but from the Guvnor point of view, they are all "assets". You create a rule by clicking the icon with the rules logo the head , and from that you enter a name.
You will also have to choose one category. Categories provide a way of viewing rules that is separate to packages and you can make rules appear in multiple packages - think of it like tagging. This will open a rule modeler, which is a guided editor. You can add and edit conditions and actions based on the model that is in use in the current package.
Also, any DSL sentence templates setup for the package will be available. 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. 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. As the Guvnor can manage many different types of rules and more , they are all classed as "assets". An asset is anything that can be stored as a version in the repository.
This includes decision 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 appropriate 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 to 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 edit 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 of 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. A : The Asset editor is where the "editor widget" lives - exactly what form the editor takes depends on the Asset type.
B : 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 can be copied over and over if needed. Package configuration is most definitely a technical task that requires the appropriate expertise.
All assets live in "packages" in the Guvnor - a package is like a folder it also serves as a "namespace". 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, they 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 effectively 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 create 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. In the future, different Working Sets could be assigned to different users to reduce the scope and complexity when authoring rules.
Subscribe to RSS
End of Support for Producer Lifecycle and Credential Management 2.0.5