How to import rules into Drools Guvnor from an xml file
Talend Administration Center incorporates the Drools Guvnor web application which enables business experts to easily and quickly build and change complex business rules directly via this Guvnor interface.
Drools Guvnor is a BRMS (Business Rule Management System) used to define, deploy, execute, monitor and maintain the variety and complexity of business rules. For detailed Drools documentation, see http://www.jboss.org/drools/documentation.html.
Drools Guvnor incorporated within Talend Administration Center allows you to use graphical editors to create and edit business rules.
An alternative is to import rules from an existing xml file. Once the rules are imported, you can still customize or test them, and apply them to data flows in Talend Jobs.
The following introduces how to import rules defined in an xml file into Drools Guvnor in Talend Administration Center.
Log into Talend Administration Center.
Note: Note that only users that have the role and rights of Operation manager or Designer can access the Drools Guvnor from Talend Administration Center.
Expand the Settings node from the Menu
tree and click Configuration to open the
Configuration page on the right side. Then, expand
Talend suite and configure the Guvnor URL which is in the format
From the Menu tree, click Drools to open
its web page. Make sure that Guvnor URL is correctly set on the
Configuration page and your license allows the application.
Note: If you access Drools web page for the first time, you can choose to import a deposit containing sample rules. Here, No thanks is clicked.
On the Drools web page, expand the Administration node. Click
Import Export to open its page.
Click Browse... to open the File Upload
dialog box. Browse to the file which stores the rules to be imported into Drools Guvnor.
Here, it is repository_export.xml. Click Open
to close the dialog box.
- Click Import. A dialog box appears which prompts you to confirm the import. Click OK.
Finally, a dialog box appears which indicates that the import is successful. Click
OK to close the dialog box.
On the Drools web page, expand the Knowledge Bases node. Click
Packages -> org ->
talend -> bank. Then, click
Business rule assets. You can see that all the business rules
defined in the xml file (repository_export.xml) are imported.
Click Open to view the details of each rule. For example,
- tBRMS allows you to apply Drools business rules to an incoming flow and write the output data to an XML file.
- tRules allows you to apply business rules defined in a Drools file of .xls or .drl format on a data flow in order to filter data.
- tRuleSurvivorship creates the single representation of an entity according to business rules. This representation is called a "survivor".