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.
In the Repository tree view, expand the Metadata node and the Rules Management node.
Right-click BRMS, and select Create BRMS from the pop-up menu.
The BRMS wizard opens:
Enter the generic metadata information such as the connection Name, Purpose and Description.
Click Next to enter the BRMS information.
Setting connection parameters and select the rules library
In this step, we enter the BRMS settings.
Enter the GuvURL Name and TAC URL in the corresponding fields.
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:
Enter your authentication information in the Username and Password fields.
Click the [...] button to browse the Jar files in the [Select Jarfile] dialog box:
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.
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.
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.
In the Linker source area, click Input Schema to open the schema editor to define the input schema:
Click the button to add as many columns as required, and define the schema as required. When done, click OK to close the editor.
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.
Drop the columns from the Linker Source area onto the Related Column field in the Linker target schema.
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.
Click Output Schema and add a new column called XML, in the output schema editor:
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
In this step you can review the input and output schemas and make modifications if required.
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.