Centralizing BRMS (Drools Guvnor) metadata - 6.3

Talend Real-time Big Data Platform Studio User Guide

EnrichVersion
6.3
EnrichProdName
Talend Real-Time Big Data Platform
task
Data Quality and Preparation
Design and Development
EnrichPlatform
Talend Studio

Talend Studio enables you to save connection details to a Drools Guvnor repository library under the Metadata folder in the Repository tree view. The BRMS connection wizard leads you through the connection steps and allows you to browse the library for Business Rules which are saved along with the connection metadata and duly transformed into a form in which they can easily be used in Jobs.

Defining the general properties

This step describes how to launch the BRMS wizard and then set the connection metadata such the Name, Purpose and Description.

  1. In the Repository tree view, expand the Metadata node and the Rules Management node.

  2. Right-click BRMS, and select Create BRMS from the pop-up menu.

    The BRMS wizard opens:

  3. Enter the generic metadata information such as the connection Name, Purpose and Description.

  4. Click Next to enter the BRMS information.

Setting connection parameters and select the rules library

In this step, we enter the BRMS settings.

  1. Enter the GuvURL Name and TAC URL in the corresponding fields.

  2. Click Browse to enter your authentication information in order to select the rules package of interest from the Drools repository.

    The [Deploy Jar] dialog box opens, with the URL fields automatically retrieved from the previous dialog box:

  3. Enter your authentication information in the Username and Password fields.

  4. Click the [...] button to browse the Jar files in the [Select Jarfile] dialog box:

  5. Expand the nodes to browse to and select the Jar file that contains the rules library of interest, then click OK to close the dialog box.

    The selected Jar file is displayed on the [Deploy Jar] dialog box.

  6. From the list next to the Jar file, select the corresponding class name and click OK to close the [Deploy Jar] dialog box and return to the BRMS wizard.

    A Talend program transforms the library into a form which can be used in a Job and creates an XSD file at the root of your studio.

  7. Click Next to define the Input Schema and the Linker Target schema in the [Schema Design] window.

Defining the schema

In this step it is necessary to define the Input Schema and Linker Target schema, according to your needs.

The XML tree in the Linker Target area is automatically retrieved.

  1. In the Linker source area, click Input Schema to open the schema editor to define the input schema:

  2. Click the button to add as many columns as required, and define the schema as required. When done, click OK to close the editor.

  3. In the Linker Target area, right-click the node to run a loop on, reason in this example, and select Set As Loop Element from the contextual menu.

  4. Drop the columns from the Linker Source area onto the Related Column field in the Linker target schema.

    Note

    You can select and drop several fields at a time, using the Ctrl + Shift technique to make multiple selections, therefore making mapping faster. You can also make multiple selections for right-click operations.

  5. Click Output Schema and add a new column called XML, in the output schema editor:

  6. From the XML Field list in the Output-Management area, select XML, and click Next to view the finalized input and output schemas.

Finalizing the input and output schemas

  1. In this step you can review the input and output schemas and make modifications if required.

  2. When done, click Finish to close the connection wizard.

The new BRMS connection, along with its schema, is added to the Repository tree view, under the Metadata > Rules Management > BRMS node.

You can drop the metadata defined from the Repository onto the design workspace as a new tBRMS component, which is automatically set with all of the connection parameters. For further information about how to use the centralized metadata in a Job, see How to use centralized metadata in a Joband How to set a repository schema.

To modify a BRMS connection, right-click it from the Repository tree view, and select Edit BRMS to open the file metadata setup wizard.

To edit a schema, right-click the schema from the Repository tree view and select Edit Schema from the contextual menu.