| Samples > Rule Team Server Authoring Extensions > How to Populate a BOM Domain from a Data Source in Rule Team Server |
How to Populate a BOM Domain from a Data Source in Rule Team Server |
PREVIOUS NEXT |
This sample shows how to plug a custom BOM domain value provider inside Rule Team Server. The same customization is available in Rule Studio (see the sample How to Populate a BOM Domain from a Data Source).
Key features include:
To install this sample through the Samples Console:
teamserver > serverbompopulate sample.
repack command to compile and repackage the application into a new deployable ear file.
deploy command to deploy the new EAR.
[EARDeployer] Started J2EE application.)
set-config-param command to register the domain provider class.
This sample can only be opened and run in the Samples Console.
To open and run the sample:
http://localhost:8080/teamserver.
bomdomainpopulate-rules project.
CurrencyRestriction.
This sample is located in <InstallDir>/teamserver/samples/serverbompopulate.
DomainValueProvider.java - Implementation of the IlrBOMDomainValueProvider interface. Provides the domain values, verbalization, and translation. Uses the DomainHelper class.
DomainHelper.java - Provides a helper for a dedicated fully qualified class of the BOM, responsible for providing the values.
Highlights of this sample are as follows.
For the purpose of this sample, the project bompopulate-rules already has a BOM that contains dynamic domains. If you have installed Rule Studio, you can import and browse the BOM Domain populate sample and navigate to the CurrencyType class.
In the class custom properties, a domainValueProviderName property is defined. The value of this property will be used to register the domain value provider in Rule Team Server.
A mapping between the BOM domain value provider identifier and the implementation class needs to be declared to Rule Team Server. This is done by the set-config-param command, which registers the key teamserver.derbyDataBaseDomainProvider to the fully qualified name of the BOM domain value provider class serverbompopulate.DomainValueProvider.
A new application containing custom JARs needs to be built and deployed. The BOM domain value provider needs to be packaged into the WAR. To do this, use the repackage-ear Ant command.
To rebuild this sample to restore it to its original state:
| Copyright © 1987-2008 ILOG S.A. All rights reserved. Legal terms. Documentation homepage. | PREVIOUS NEXT |