Implementation
After analyzing your reference data and completing the data modeling, you can proceed to implement the reference data model. This chapter describes the process of implementing reference data with IBM InfoSphere Master Data Management Reference Data Management Hub (InfoSphere MDM Ref DM Hub). The chapter includes the following topics:
Installation
Configuration
Implementing data resources using InfoSphere MDM Ref DM Hub Client web user interface (UI), batch jobs, and application programming interfaces (APIs)
Customization
7.1 Installation
InfoSphere MDM Ref DM Hub has two types of entitlements, IBM InfoSphere MDM Reference Data Management Hub license and Custom Data Hub license. Both have the same InfoSphere MDM Ref DM Hub contents.
Installing InfoSphere MDM Ref DM Hub is a multi-step process that includes the following tasks:
1. Prepare for installation:
a. Check the specific hardware and software requirements that must be met to properly install and run the InfoSphere MDM Ref DM Hub.
b. install the prerequisite applications, including the InfoSphere MDM Custom Domain Hub.
2. Install InfoSphere MDM Ref DM Hub:
a. Install the database entities.
b. Install the web application.
You can use IBM Installation or run command-line processes to install the product.
3. Configure security and authorization in the web application server.
InfoSphere MDM Ref DM Hub uses a role-based security concept. Activities and states entities are related to roles, which are linked to groups that you define in the application server. Users are members of these groups.
4. Configure the components.
After installation is finished, you can configure additional components:
 – Adjusting transaction time-outs
 – Configuring batch export
 – Configuring application defaults
 – Customizing the custom page tab
This section demonstrates the InfoSphere MDM Ref DM Hub installation with IBM Installation Manager in a Windows environment.
For detailed installation and configuration information, see the information center:
7.1.1 Product download
You can download InfoSphere MDM Reference Data Management Hub V10.1.0 though the IBM Passport Advantage® website by using the following information:
Part number: CIB2UML
Product name: IBM InfoSphere Master Data Management Reference Data Management Hub V10.1.0 Multiplatform Multilingual
File name: IS_MDM_RDMH_V10.1_MLTP_ML.tar.gz
7.1.2 Installation with IBM Installation Manager
InfoSphere MDM Ref DM Hub installation with IBM Installation Manager can accomplish two tasks:
Reading and accepting the license agreement during the installation stage.
Installing application files to a target directory.
If you do not have IBM Installation Manager, you can download it:
Complete the following steps to install InfoSphere MDM Ref DM Hub to a target file system:
1. Extract IS_MDM_RDMH_V10.1_MLTP_ML.tar.gz file to a temporary directory on your local file system, as in the following example:
C: emp
2. Extract the RDMRepos.zip file to a temporary directory, as in the following example:
C: empRDMINST-V10.1.0-2012-08-16
3. Open IBM installation manager and configure the installation manager to point to the InfoSphere MDM Ref DM Hub repository configuration file, as in the following example:
C:ProjectsIMRDMRDMINST-V10.1.0-2012-08-16output epository.config
4. Click Install to install InfoSphere MDM Ref DM Hub and provide an installation path for the installation. We use C:Tools as the path.
In a successful installation, you see the folders and files (shown in Figure 7-1), which are created under the following path:
C:ToolsIBMInfoSphere MDM Reference Data Management
Figure 7-1 Extracted files and folders by the installation manager
The folders and files are as follows:
BatchExport folder contains all files that are related to the InfoSphere MDM Ref DM Hub Batch Export.
License folder contains all InfoSphere MDM Ref DM Hub supported language licenses and notices files.
Scripts folder contains all SQL script files for setting up InfoSphere MDM Ref DM Hub database and the rollback scripts. InfoSphere MDM Ref DM Hub supports both DB2 and Oracle databases and the scripts files are similar for these two database systems. Figure 7-2 shows the DB2 SQL file names.
Figure 7-2 DB2 SQL script files
MIH101-App.ear file is the InfoSphere MDM Ref DM Hub server component.
RDMClientEAR.ear file is the InfoSphere MDM Ref DM Hub client component.
README_DB2.txt and README_Oracle.txt files include the instructions on which SQL scripts must run for a fresh InfoSphere MDM Ref DM Hub V10.1.0 installation.
You must manually install both the InfoSphere MDM Ref DM Hub server component and the client component.
7.1.3 InfoSphere MDM Ref DM Hub server installation
Before installing the InfoSphere MDM Ref DM Hub server component, you must run the SQL setup scripts to install the database entities. The scripts are in the following directory, where <InstallDir> is where the InfoSphere MDM Ref DM Hub is installed:
<InstallDir>/scripts/sql/<db_type>
Follow the instructions in the readme file for the database type:
DB2: <InstallDir>/README_DB2.txt
Oracle: <InstallDir>/README_Oracle.txt
When running the database scripts, if it is a fresh installation, you do not need to run any of the Rollback scripts, just the scripts other than roll back are sufficient. Example 7-1shows the command to run DB2 script to set up DB2 tables.
Example 7-1 Example of set up InfoSphere MDM Ref DM Hub tables for DB2
db2 -tvf RDM_SETUP_DB2.sql
db2 -v -td@ -f RDM_TRIGGERS_DB2.sql
db2 -tvf RDM_CONSTRAINTS_DB2.sql
db2 -tvf RDM_MetaData_DB2.sql
db2 -tvf RDM_CODETABLES_DB2.sql
db2 -tvf CONFIG_XMLSERVICES_RESPONSE_DB2.sql
db2 -tvf index.sql
db2 -tvf SystemDefaultStateMachine.sql
db2 -tvf updateMIHEntityValidationConfig.sql
In the scripts in Example 7-1, the default schema is db2admin. It must be replaced accordingly if the schema name that is used differs.
The MIH-App.ear file is the InfoSphere MDM Ref DM Hub server component. Before installing the MIH-App.ear to the server, you must modify the EAR file with certain configuration changes, and turn off the Entitlement Engine.
Follow the preparation instructions, which are available at the information center:
After you complete the preparation tasks, use the following steps to install the MIH-App.ear file:
1. Make sure WebSphere Application Server is running.
2. From WebSphere Application Server, using the administration console, select Applications → New Application  New Enterprise Applications.
3. Click Install and browse to the MIH-App.ear file.
4. Select the Fast Path installation option, accept the defaults, and click Finish.
7.1.4 RDM client installation
InfoSphere MDM Ref DM Hub client runs on a WebSphere Application Server. Complete the following steps to install InfoSphere MDM Ref DM Hub client:
Make sure WebSphere Application Server is running.
From WebSphere Application Server using administration console, choose Applications → New Application → New Enterprise Applications.
Click Install and browse to the RDMClientEAR.ear file.
Select the Fast Path installation option, accept the defaults, and click Finish.
If InfoSphere MDM Ref DM Hub is not installed with the default port (9080), the configuration of the web service clients must be changed. You can find the configuration in the following location:
RDMClientEAR/RestAPI.war/WEB-INF/classes/client.properties
If the correct host aliases are not defined in WebSphere Application Server, you might see an error message when you log in to InfoSphere MDM Ref DM Hub; the message states that virtual hosts are not defined.
One solution you can try is as follows:
1. Click Servers → WebSphere application servers → <server_name> → Ports.
2. Note the values for the following items:
 – SIP_DEFAULTHOST
 – SIP_DEFAULTHOST_SECURE
 – WC_defaulthost
 – WC_defaulthost_secure
3. Click Environment → Virtual Hosts → <default_host> → Host Aliases.
4. Create new aliases based on the four values you noted.
7.2 Configuration
This section describes InfoSphere MDM Ref DM Hub configuration tasks regarding the following items:
Security and authorization
Lifecycle and state machine
Regular expression validation
7.2.1 Configure security and authorization
InfoSphere MDM Ref DM Hub uses a role-based security model. Activities and state entities are related to roles, which are linked to groups that are defined in the application server. Users are members of these groups.
To log in to the InfoSphere MDM Ref DM Hub web user interface (UI) application, you must enable WebSphere Application Server global security, create users and groups, and then associate users to groups to enable them to performing certain activities.
This section shows how to do the following tasks:
Configure the web application server security.
Create groups on WebSphere Application Server.
Create owner groups in InfoSphere MDM Ref DM Hub.
Create users in WebSphere Application Server or LDAP and assign them to groups.
Add roles, if needed.
Associate the roles with the WebSphere or LDAP groups.
Configuring WebSphere Application Server and application security
Configure WebSphere Application Server global security as follows:
1. Start and log in the WebSphere Application Server administrative console.
2. Browse to Security → Global Security.
3. In the User Account Repository, select Federated Repositories.
4. Click Configure.
5. In the General Properties section of Federated Repositories, select the following options:
 – Automatically generated server identity
 – Ignore case for authorization
6. On the Administrative User Password page, provide a password for your administrative user. This user is the one to access the administrative console.
7. On the Global Security page, click Save.
Figure 7-3 shows the result of this configuration. You see that both administrative security and application security are enabled.
Figure 7-3 Configured application security
Creating groups in the WebSphere Application Server
The RDMRole_* groups are used for the user interface. The group MDM is associated with the service provider and consumer role. If you want to access server-side functions, you must become a member of the MDM group.
Complete the following steps to create a group:
1. Start the WebSphere Application Server administrative console and log in with a user name and password that you set up for your WebSphere Application Server administrative security.
2. Browse to Users and Groups → Manage Groups.
3. Click Search to show the existing groups.
4. In the Manage Groups section, click Create.
5. On the Create a Group page, add the following groups. Click Create after adding each group.
 – RDMRole_Administrators
 – RDMRole_All
 – RDMRole_Approvers
 – RDMRole_Approvers2
 – RDMRole_Custom
 – RDMRole_Integrators
 – RDMRole_Stewards
 – crm
 – enterprise
 – mdm
Creating and assigning users
You create users and assign them to groups to give them access to the functions through WebSphere Application Server.
Complete the following steps to create and assign users:
1. Log in the WebSphere Application Server administration console.
1. Expand the Users and Groups menu and select Manage Users.
2. Click Search to show all current users.
3. On the Manage Users panel, click Create.
4. In the Create a User page, type a User ID as listed in Table 7-1 on page 169.
5. Click Group Membership and add the group to which you want each user to belong. See the examples in Table 7-1 on page 169.
6. Provide a password for the user.
Table 7-1 lists users and groups, supported by InfoSphere MDM Ref DM Hub.
Table 7-1 Example of system users to add
User ID
Group
Password
admin
RDMRole_Administrators, enterprise
passw0rd
approver
RDMRole_Approvers, enterprise
passw0rd
approver2
RDMRole_Approvers2,mdm
passw0rd
integrator
RDMRole_Integrators, enterprise
passw0rd
mdm
RDMRole_All
passw0rd
mih
None
passw0rd
steward
RDMRole_Stewards,enterprise
passw0rd
steward2
RDMRole_Stewards,mdm
passw0rd
super
RDMRole_Administrators, RDMRole_Approvers, RDMRole_Integrators, RDMRole_Stewards, crm, enterprise, mdm
passw0rd
tabs
RDMRole_All, crm, enterprise, mdm
passw0rd
For more details about InfoSphere MDM Ref DM Hub security, see the “Creating roles” topic in the information center:
To associate groups and roles, see the following page in the information center:
7.2.2 Lifecycle and state machine
Reference data lifecycle management is about managing the states of a reference data set throughout its lifecycle: from creation and initial storage to the time when it becomes obsolete and is deleted. The core InfoSphere MDM Ref DM Hub objects can have a well-defined lifecycle that specifies the governance over the state of a reference data object.
The lifecycle management is supported with the use of a combination of property files and data base table configuration. For the details of lifecycles and their possible states, see the information center:
For the details of the various database tables involved in the governance of the lifecycle of an InfoSphere MDM Ref DM Hub object, see the information center:
It also has an example of the steps to follow to create a custom lifecycle process.
7.2.3 Regular expression validation
Regular expression validation checks a property value against a validation rule. If the value does not match the validation rule, an error is displayed on the widget in the InfoSphere MDM Ref DM Hub UI.
A validation rule is defined for a string type of a property. In InfoSphere MDM Ref DM Hub, you can define a validation rule for the following properties:
The Code property for a reference data set
The Custom properties with a string type for a reference data set for both set level and value level.
You can define a validation rule when you define or edit a reference data type or a custom property. The validation rule is an optional field so you can place a constraint on some set values.
Validation expression syntax is based on the Java regular expression syntax. InfoSphere MDM Ref DM Hub matches only when the entire input string explicitly matches.
Table 7-2 lists the characters for validation expression.
Table 7-2 List of characters for the regular expression
Characters
Meaning of the character
Escape character. Forces any special character to be a normal character.
[
Signifies the beginning of a character class.
]
Signifies the end of a character class.
d
Any digit and equivalent to [0-9].
D
Any non-digit.
s
White space characters.
S
Non-whitespace characters.
^
Signifies not. For example, [^A-Z] matches a character if it is not a capital letter.
?
Matches zero or one time.
*
Matches zero or more times.
+
Matches one or more times.
{n}
Matches n times.
{n,}
Matches n or more times.
{n, m}
Matches between n and m times, inclusive.
w
Word characters and equivalent to [A-Za-z0-9].
Example 7-2 Code format
Rule: The code for any entered value must be two letters followed by three digits. Validation rule:
 
[A-Za-z]{2}[d]{3}
 
 
valid value: Abc123
InValid value:adcd12
Example 7-3 Alphanumeric code
Rule: Any combination of numbers and letters, with a length of at least 1.
Validation rule:
 
[A-Za-z0-9]+
Example 7-4 Part number
Rule: A six to eight digit number, optionally followed by a hyphen and another five digit number. Validation rule:
 
[d]{6,8}(-d{5}])?
Example 7-5 Email address
Rule: An alphanumeric handle followed by an @ symbol, followed by the domain name. Validation rule:
 
[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+.[A-Z]{2,4}
 
 
 The beginning of a word boundary.
[A-Aa-z0-9._%+-]+ Matches any combination of uppercase and lowercase letters, digits, period, underscore, percent sign, plus sign, or minus sign characters.
@ The next character must be an at sign(@).
[A-Za-z0-9.-]+ Matches any combination of uppercase and lowercase letters, digits, period and minus sign characters.
. Literally matches the peirod character.
[A-Za-z]{2,4} The next 2-4 characters must be letters.
 The end of a word boundary.
7.3 Implementing InfoSphere MDM Ref DM Hub model
This section shows how to create reference data types, sets, and mappings, by using the import web user interface, and the MDM Ref DM Hub web service API.
The section then demonstrate how to distribute this data to external applications or other file systems.
7.3.1 Creating reference data sets
With InfoSphere MDM Reference Data Management Hub web UI, you can group your reference data sets in folders. You can have subfolders in a folder. Each reference data set is based on a reference data type that can be a default data type or a custom data type. If you create a reference data set with custom properties, you must define the custom properties in a data type.
This section shows you how to do the following tasks:
Create a default reference data set.
Define a data type that has a reference data set property.
Create a reference data set that has a related reference data set.
Create a reference data set value manually.
Create multiple reference data set values by importing a file.
In the example, we create a root folder named Chap08.
A default reference data type has a set of core properties including Code and Name. You must log into InfoSphere MDM Ref DM Hub and select a role that permits that access to the Administrator tab.
Creating a default reference data set
Complete the following steps to create a reference data set with a default data type in Web UI:
1. Select the Chap08 folder.
2. Create a new set by either clicking New Set or right-clicking to open the context menu and then selecting New → Set. See Figure 7-4 on page 174.
The Create a Set window opens, with the values of the following properties:
 – Name: CountryCode
 – Version: 1, by default (You can change it to another version.)
 – Type: Default Reference Data Type
 – Lifecycle Process: Simple Approval Process
 – Effective Date: current date and time, by default
3. Click OK to create a new set.
Figure 7-4 Create a reference data set
The new set named CountryCode is created under the chap08 folder and an empty set in the set view is displayed on the right panel next to the Reference Sets List.
After a reference data set is created, you can either manually create reference values or import reference data set values from a comma-separated values (CSV) file or an XML file.
Creating a reference data set value manually
You can manually create a reference data set by using the following steps:
1. Click New under the Reference Value as shown in Figure 7-5.
Figure 7-5 Create a reference data set value
2. Tabbed panels are displayed on the right pane, under the View, for creating a reference data set value. Enter US for the Code property; enter United States for the Name property.
3. Click Save under the CountryCode(1) to save the properties.
4. A new reference value is created, which you can see under the Reference Value pane list, as in Figure 7-6.
Figure 7-6 A newly created reference data set value
You can also edit or delete a reference data set value manually.
Creating reference data set values by importing a CSV file
The best practice for creating a large number of reference data set values is to import a CSV or an XML file into a pre-created empty set.
Before you import a CSV file, look at the column names and values that are in the CSV file. The first row of the CSV file lists the column names that are mapped to the properties of a reference data set in InfoSphere MDM Ref DM Hub. Figure 7-7 shows a snippet of our sample CSV file with two column names: ISO Country Code and Name. They are mapped to the Code and Name of a reference data set during importing of a CSV file. This task is done through the import wizard.
Figure 7-7 CSV file
Complete the following steps to import reference data set values:
1. Right-click the CountryCode set in the Folder View to open a context menu, as shown in Figure 7-8. Click Import to import a reference data set.
Figure 7-8 A set context menu: Right-click the CountryCode
2. Browse to the CountryCode.csv file and click Next (Figure 7-9).
Figure 7-9 Choose import file wizard
3. Both Code and Name properties are mapped automatically in Map File Columns pane (Figure 7-10).
Figure 7-10 Map file columns
In the Preview File pane(Figure 7-11), a list of reference data set values are displayed for preview.
Figure 7-11 Preview the CSV file content
4. In the Summary panel (Figure 7-12), the wizard displays the number of values imported. Any row that failed to be imported is displayed with an error message. Review the error message carefully and fix the problem in the CSV file and import it again.
Figure 7-12 Summary of importing a CSV file
 
Tip: If any date or time values are in the CSV file, be sure that the value matches the date and time format that is specified in the import file wizard. Any mismatch results in an error and the entire row will be skipped.
Figure 7-13 shows that the reference data set values are imported.
Figure 7-13 Reference data set values by importing a CSV file
Importing an XML file is similar to importing a CSV file. Select an XML file format in the Choose Import File step (Figure 7-9 on page 177). Then, follow the import wizard to complete the import steps.
Creating a reference data set with custom properties
This section describes how to create a reference data set with custom properties. At the data analysis stage, you must decide whether your data needs to be modeled as a custom data type. In general, if your CSV file, XML file, or a database table contains extra columns other than those found in the default properties of InfoSphere MDM Ref DM Hub, you must consider whether to include the columns. If they are to be included. then a custom data type must be defined and created for each column.
Defining a custom data type
With InfoSphere MDM Ref DM Hub, you can define custom types in the reference data set type. When you create a custom data type that has a reference data set property, you must ensure that the reference data set was created and approved in InfoSphere MDM Ref DM Hub. You must log in to InfoSphere MDM Ref DM Hub with an account that has permission to create a data type with custom properties.
This section uses a pre-created reference data set named Country in the Geography folder and this set is in an approved status. Complete the following steps to create a reference data set type in InfoSphere MDM Ref DM Hub:
1. On the Administration tab, click New. The Create Data Type dialog box opens. See Figure 7-14.
Figure 7-14 Create a data type
2. Enter the following information:
 – In the Name file, type CountryType.
 – In the Data types field, select Reference Data Set.
 – Click OK.
3. Both Value Level and Set Level are created as shown in Figure 7-15. Select Value Level → New to define a custom property at Value Level.
Figure 7-15 An empty CountryCodeType
4. In the Data Type Property window (Figure 7-16), do the following steps:
a. In the Name field, enter ISOCountry.
b. In the Type field, select Reference Data Set.
Figure 7-16 Data Type Property window
c. In the Related set field, click the search icon to start a widget, which has a filter.
d. Select a reference data set. See Figure 7-17.
Figure 7-17 Select a reference data set from InfoSphere MDM Ref DM Hub
In the example, we enter Country and select it from the list. Click Select. The wizard brings you back to the Data type property dialog window.
e. Click OK to create the CountryCode property.
Figure 7-18 shows that the custom property is created.
Figure 7-18 A custom property in the defined data type
You can define as many custom properties as you like. A custom property can be any supported data type as shown in Figure 7-19. You can select a custom property to edit or delete before the custom data type is used.
Figure 7-19 RDM supported custom property data types
Creating a reference data set with a custom data type
This section shows how to create a reference data set with a custom property, with an example. This example uses the custom data type, CountryType, that was created in the previous steps.
Use the following steps to create a reference data set with a custom data type:
1. Log in to InfoSphere MDM Ref DM Hub with the user ID and password that has the proper authorization.
2. Right-click the Chap08 folder and then select New → Set.
3. Enter the set properties. We created a set by specifying the following information (see Figure 7-20 on page 185):
 – Type MDMStates in the Name field.
 – Select CountryType by clicking the search icon for the Type.
 – Select Simple Approval Process from the Lifecycle process list.
 – Use default values for every other field.
Click OK to create the set.
Figure 7-20 Create a Set dialog
After the reference data set is created, we use the import steps described in “Creating reference data set values by importing a CSV file” on page 176 to import values from a CSV file to the new created set MDMStates.
Figure 7-21 shows that the MDMStates set has the value populated.
Figure 7-21 Imported MDMStates set values
Creating a set with the InfoSphere MDM Ref DM Hub web service APIs
The InfoSphere MDM Ref DM Hub exposes the RDMPort.wsdl file so that the InfoSphere MDM Ref DM Hub Rest services can use the web service APIs to make the web service call. With the InfoSphere MDM Ref DM Hub web service APIs, you can send SOAP messages to the web service.
Example 7-6 shows code for creating new reference data set.
Example 7-6 API to create new reference data set
public RDValueSetResponse addRDValueSet(Control control, RDValueSet request) throws java.rmi.RemoteException, com.ibm.wcc.service.intf.ProcessingException;
public RDValueSetResponse updateRDValueSet(Control control, RDValueSet request) throws java.rmi.RemoteException, com.ibm.wcc.service.intf.ProcessingException;
You must use addRDValueSet to create a new set in InfoSphere MDM Ref DM Hub and you can then use updateRDValueSet to add, update, and delete the set values.
Example 7-7 shows a code snippet for creating a new set.
Example 7-7 Creating a new set
// 1. create RDMService port type
RDMService_PortType RDMService = new ServiceFatory().newRDMService();
 
// 2. create a Control object from the HttpRequest object,set reqester name and role and the paging information etc.
Control control = getNewControl(HttpServletRequest request);
 
//3. get a set type from a set type ID and get a set state machine from initial //type, such as Default Set type and Simple Process Approval
RDValueType type = null;
RDStateMachine stateMachine = null;
try {
type = RDMService.getRDValueType(control, typeID,1).getResponse();
stateMachine = RDMService.getRDStateMachine(control, stateMacineID).getResponse();
} catch (ProcessingException e1) {...}
 
//4. get the set value property Type
RDValuePropertyType[] rdValuePropertyType = null;
try {
rdValuePropertyType = RDMService.getRDValuePropertyTypeByValueTypeID(control, type.getIdPK().get_value()).getResponse();
} catch (ProcessingException pe) {...}
 
//5. create a RDValueSet object with an initial RDState
// and a set name
RDValueSet updatedValueSet = new RDValueSet();
updatedValueSet.setRdState(stateMachine.getInitialState());
updatedValueSet.setRdValueSetName(“CRMStates”);
 
// 6. make web service call to update or create the value set
try {
updatedValueSet = RDMService.addRDValueSet(control, updatedValueSet).getResponse();
long newSetID = updatedValueSet.getBaseID();
} catch (ProcessingException ex) {... }
Example 7-8 shows a code snippet for adding a set value to an existing set. The valuesList is a list of new created set values.
Example 7-8 Adding set values using updateRDValueSet API
// setID is the give set ID
RDValueSet set = null;
try {
set = RDMService.getRDValueSet(control, setID, 0).getResponse();
}catch (ProcessingException ex) {...}
 
RDValue[] modifiedValues =
valuesList.toArray(new RDValue[valuesList.size()]);
set.setRdValue(modifiedValues);
...
RDValueSet updatedSet = RDMService.updateRDValueSet(control, set).getResponse();
7.3.2 Creating mappings
Mappings are designed for maintaining a relationship between two sets that can be similar or different versions of a set, or relationships between two set values. Creating a mapping is similar to creating a set. Each mapping has a type that defines a set of core properties of a mapping. You can define a mapping with a default mapping type or a custom mapping type.
This section shows how to create a mapping, based on the default mapping type, between two sets. In this example, we use a source set MDMStates and a target set CRMStates. See Figure 7-22 on page 189.
Figure 7-22 CRMStates set
The MDMStates and CRMStates use separate codes and names to represent a Country code and thus need a code mapping between these two sets.
Use the following steps to create a mapping:
1. Log in to InfoSphere MDM Ref DM Hub with a user name and password that has the proper authorization, and click the Mappings tab.
2. Click New on the Mapping Browser tab to create a new mapping (Figure 7-23 on page 190). Enter the following data for the required fields:
 – Source set: Type MDM in the filter widget and select MDMStates(1, Draft).
 – Target set: Type CRM in the filter widget and select RDMStates(1, Draft).
 – Name: Enter MDM To CRM States.
 – Type: Use Default Mapping Type.
 – Life cycle process: Select Simple Approval Process.
Keep the defaults on all other fields. Click OK to create this mapping.
Figure 7-23 Creating a mapping
After a mapping is created, you can create value mappings either manually or by importing.
Creating value mappings manually
To map the values between two sets, complete the following steps:
1. Click New on the Create value mappings pane. You then see a new pane with two panes: Value Mappings and Create Mapping, as Figure 7-24 shows.
Figure 7-24 Creating a value mapping
2. Select the appropriate lines from both Source Values and Target Values to enable the Create Mapping button. In the example, it is the first line of both sets.
3. Click Create Mapping to create a value mapping, as shown in Figure 7-25:
 – Enter the following source values:
 • Name: Alabama
 • Code: AL
 • ISOCountry: [US] United States
 – Enter the following target values:
 • Name: AL
 • Code: 1
 • ISOCountry: [US] United States
 – Leave the custom property empty because the default type mapping has no custom properties.
Click OK to create the value mapping.
Figure 7-25 Creating a value mapping
4. Click Save to save the value mapping as in Figure 7-24 on page 191.
5. As shown in Figure 7-26 on page 193, a new value mapping (AL  1) is displayed in the value mappings data grid. You may also select both of the following check boxes in the bottom pane, to show only unmapped values:
 – Show only unmapped Source values
 – Show only unmapped Target values
Figure 7-26 Manually created a value mapping
You can repeat these steps to create more value mappings. If you create a large number of value mappings, use import value mappings from a CSV file.
Importing a mapping from a CSV file
A mapping CSV file contains a list of the source code and the target code values. Table 7-3 shows content of a typical CSV file.
Table 7-3 MDM to CRM.csv content
MDM Code
MDM.ISOCountry.Code
CRM Code
CRM.ISOCountry.Code
AL
US
1
US
AK
US
2
US
AZ
US
3
US
AR
US
4
US
...
WY
US
51
US
 
Unsupported: Importing an XML file to a mapping is not supported in InfoSphere MDM Ref DM Hub V10.1.*.
Use the following steps to import a mapping from a CSV file:
1. Log in to InfoSphere MDM Ref DM Hub with a user name and password that has a proper authorization. Click the Mappings tab on the navigation bar. A list of created mappings opens (Figure 7-27). If you cannot see the mapping on the list, you can type a source name or a target name in the Filters section to search for an existing mapping. Note that the MDM to CRM States mapping is highlighted.
Figure 7-27 A mapping list
2. Right-click MDM To CRM States and select Import to start the import wizard.
3. In the Import mapping wizard, click Browse to select the MDM to CRM States.csv file to import, as shown in Figure 7-28.
Figure 7-28 Choosing a CSV file to import
4. In Map File Columns section (Figure 7-29), select the appropriate column name to its corresponding property.
Figure 7-29 Map file column names to the mapping properties
5. In the Preview File section (Figure 7-30), carefully review the data in Data Preview tab. Click Finish.
Figure 7-30 Data preview
6. The Summary section (Figure 7-31) shows you a summary with the number of inserts, exceptions, and updates. Then, click Done.
Figure 7-31 Importing mapping summary
A list of value mappings is created (Figure 7-32).
Figure 7-32 Imported MDM To CRM value mappings
Creating mapping with InfoSphere MDM Ref DM Hub web service APIs
In InfoSphere MDM Ref DM Hub V10.1.*, the REST services use the Web Service RPC client to create a mapping with the APIs.
To create a mapping with web service API, you must create the following items:
Create a mapping with the addRDValueSetRelationship API. See Example 7-9.
Example 7-9 The addRDSetRelationship API
public RDValueSetRelationshipResponse addRDValueSetRelationship(Control control, RDValueSetRelationship request) throws java.rmi.RemoteException, com.ibm.wcc.service.intf.ProcessingException;
Create a control object with HttpServletRequest as follows:
Control control = ControlUtil.getNewControl(httpServletRequest);
Create an RDValueSetRelationship object as wsRel.
Example 7-10 shows an API code snippet for creating new mappings.
Example 7-10 Code snippet to create a new mapping
RDMService_PortType RDMService = new ServiceFactory().newRDMService();
// The RDM web service port type
RDValueSetRelationship wsRel = new RDValueSetRelationship();
Long stateMachineID = 0L; // the id for the life cycle type for this mapping
RDStateMachine stateMachine = null;
RDMService.getRDStateMachine(control, stateMachineID).getResponse();
RDValueType type = null;
RDMService.getRDValueType(control, typeID, 1).getResponse();
String name = “MDM To CRM States”;
wsRel.setRdState(stateMachine.getInitialState());
wsRel.setRdValueSetRelationshpName((String)name);
 
RDValueSet source = null;
RDValueSet target = null;
try {// Get the source and target base id
long sourceSetIDPK = wsRel.getSourceSetVersionIdPk();
long targetSEtIDPK = wsRel.getTargetSetVersionIdPk();
source = RDMService.getRDValueSet(control,sourceSetIDPK, 0).getResponse();
target = RDMService.getRDValueSet(control,targetSEtIDPK, 0).getResponse();
wsRel.setSourceSetID(source.getBaseID());
wsRel.setTargetSetID(target.getBaseID());
} catch (ProcessingException e1){
...}
create a mapping with the wsRel object.
RDValueSetRelationship mapping;
try {
mapping = RDMService.addRDValueSetRelationship(
control, wsRel).getResponse();
}
catch (NumberFormatException e) {...}
catch (ProcessingException e) {...}
catch (RemoteException e) {...}
Importing a mapping using the InfoSphere MDM Ref DM Hub web service API
A mapping is a relationship between two sets and it has a list of relationships that are associated between values from the two sets.
Importing a mapping is to update a mapping at the set relationship level. You can use the web service API (Example 7-11) to import a mapping.
Example 7-11 The updateRDValueSetRelationship API
public RDValueSetRelationshipResponse updateRDValueSetRelationship(Control control, RDValueSetRelationship request) throws java.rmi.RemoteException, com.ibm.wcc.service.intf.ProcessingException;
Example 7-12 shows a code snippet to import a mapping with API.
Example 7-12 Importing with the updateRDValueSetRelationship API
// both control and RDMService object are created with the same sample above
List<RDValueRelationship> newMappings;
// it is created from a list of source and target code values
// you must create the newMappings before using it
mapping.setRdValueRel(newMappings.toArray(new RDValueRelationship[newMappings.size()]));
RDValueSetRelationship response = RDMService.updateRDValueSetRelationship(control, mapping).getResponse();
7.3.3 Distributing reference data sets
InfoSphere MDM Ref DM Hub reference data sets can be distributed by manually exporting them using the web UI, by calling the web service API, or by using batch export.
Exporting reference data sets with InfoSphere MDM Ref DM Hub web UI
This section shows an example of exporting the reference data set MDMStates to an XML file by using the InfoSphere MDM Ref DM Hub web UI.
The steps are as follows:
1. Log in to the InfoSphere MDM Ref DM Hub web UI with a user name and password that has proper authorization through the following URL:
https://rdmdemo:9443/RefDataClient
2. Navigate to the MDMStates set (created in 7.3.1, “Creating reference data sets” on page 172) under the Chap08 folder.
3. Right-click MDMStates(1, Draft) and select Export to open the Export wizard, as shown in Figure 7-33.
Figure 7-33 Choosing export format
4. In the Define Export Parameters section (Figure 7-34), select the XML file format.
Figure 7-34 Defining export parameters
5. In the Choose Properties to Export section (Figure 7-35 on page 202), do the following steps:
a. For the Set properties, click the double right-angle brackets button (>>) to move all available properties to the selected properties.
b. For the Value properties, click the >> button to move all available properties to the selected properties.
c. Select the Export the value translations check box.
Figure 7-35 Choosing properties to export
6. In Edit Properties to Export (Figure 7-36 on page 203), do the following steps:
 – Select the column property to edit the name as your preference.
 – Click Back if you do not want to export a specific property.
 – Click Next to save the export format for reuse.
Figure 7-36 Edit properties to export
7. In Save Format, click Finish.
8. In Summary (Figure 7-37), click Download File to download the exported XML file to your file system. Then, click Done to complete the export task.
Figure 7-37 Summary
Now you can open the downloaded file to examine the exported contents. The file should have one SetLevelProperties and one list of RefDataValue.
Example 7-13 shows the content snippet of MDMStates_Draft_1.xml, our exported XML file.
Example 7-13 Exported XML file content
<SetLevelProperties>
<Name>MDMStates</Name>
<Description/>
<Owners name="Owners">
<Owner>crm</Owner>
<Owner>enterprise</Owner>
<Owner>mdm</Owner>
</Owners>
<Version>1</Version>
<LifeCycleProcess>Simple Approval Process</LifeCycleProcess>
<State>Draft</State>
<Type>CountryType</Type>
<ReviewDate/>
<EffectiveDate>2013-02-19T17:48:07Z</EffectiveDate>
<ExpiryDate/>
<LastUser>tabs</LastUser>
<LastUpdate>2013-02-18T07:58:40Z</LastUpdate>
</SetLevelProperties>
<RefDataValue>
<Code>AL</Code>
<Name>Alabama</Name>
<Description/>
<SortOrder>1</SortOrder>
<Properties>
<Property name="ISOCountry" type="Reference DataSet">
<Property name="Code">US </Property>
</Property>
</Properties>
<ReviewDate/>
<EffectiveDate>2013-02-18T07:58:40Z</EffectiveDate>
<ExpiryDate/>
</RefDataValue>
...
Exporting reference data sets with the web service APIs
To export a reference data set, you must first retrieve a reference data set, the set values, and the translations of each value, and then write the reference data set into an XML or CSV file.
Example 7-14 shows the getRDValueSet API. The rdValueSetID is the set ID; the inquiryLevel is to control whether the value translations are returned.
Example 7-14 The getRDValueSet API
public RDValueSetResponse getRDValueSet(Control control, long rdValueSetID, long inquiryLevel) throws java.rmi.RemoteException, com.ibm.wcc.service.intf.ProcessingException;
For a description of how to create an instance of RDMService and create a control object, see 7.3.1, “Creating reference data sets” on page 172.
Example 7-15 shows how to get the RDValueSet object to be exported.
Example 7-15 An example of retrieving a reference data set
try {
// inquiry level is 2 for retrieving
RDValueSet response = RDMService.getRDValueSet(control, setID,2).getResponse();
} catch (RemoteException e) {
e.printStackTrace();
} catch (ProcessingException e) {...}
For details about the RDValueSet object, see the information center:
Exporting reference data sets with batch export commands
Batch export is a stand-alone Java application that allows you to export set, set data type, and mappings.
The batch export is located in %RDM_PATH%/BatchExport, where %RDM_PATH% is your InfoSphere MDM Ref DM Hub installation directory. In our example, it is C:ToolsIBMInfoSphere MDM Reference Data Management.
Figure 7-38 shows the eight files under the BatchExport directory.
Figure 7-38 Batch export files
You must configure the RDMBatchExportClient.properties file to communicate with the InfoSphere MDM Ref DM Hub server. Figure 7-39 shows an example of the RDMBatchExportClient.properties file.
Figure 7-39 Example of batch export configuration
The following example exports a data set and type in a Windows operating system. Run the following command from a command prompt:
C:ToolsIBMInfoSphere MDM Reference Data ManagementBatchExport>RunBatchExport.bat rds=MDMStates, state=Draft, version=1
This command exports the MDMStates version 1 set in draft state to a CSV file. The CSV file output folder is defined in the RDMBatchExportClient.properties file. In our example, it is C:Output.
Figure 7-40 shows the exported MDMStates_Draft_1.csv file.
Figure 7-40 MDMStates.CSV file exported with batch export command
Figure 7-41 shows other batch export command arguments.
Figure 7-41 A full list of batch command argument list
The UNIX command syntax is similar. For details, see the information center:
7.3.4 Distributing mappings
Distributing mappings is the process of exporting mappings to either a CSV file or an XML file for consumption by external applications or systems. This section shows you how to export mappings through the InfoSphere MDM Ref DM Hub web UI, API, and Batch export command.
Exporting mappings in InfoSphere MDM Ref DM Hub web UI
This example exports the MDM To CRM mapping, which is created in 7.3.3, “Distributing reference data sets” on page 200, to an XML file y using the InfoSphere MDM Ref DM Hub web UI.
The steps are as follows:
1. Log in to the InfoSphere MDM Ref DM Hub web UI with a user name and password that has proper authorization.
2. Click the Mappings tab and select MDM To CRM States.
3. Right-click the MDM To CRM States mapping and then select Export  to XML as shown in Figure 7-42.
Figure 7-42 Export MDM To CRM States
4. The MDM To CRM States_Draft_1.xml is ready for opening or saving to a folder (Figure 7-43).
Figure 7-43 Exported MDM To CRM States XML
5. Click Save to save the file to your local file system for review or reuse later.
Figure 7-44 shows a snippet of the exported mapping in XML format.
Figure 7-44 A code snippet of the exported mapping file
Exporting mappings with the web service API
You can export mappings with the web service APIs. Example 7-16 shows the API for exporting mappings.
Example 7-16 The related mapping API
public RDValueSetRelationshipResponse getRDValueSetRelationship(Control control, long rdValueSetRelationshipID, long inquiryLevel) throws java.rmi.RemoteException, com.ibm.wcc.service.intf.ProcessingException;
Complete the following steps before exporting the mapping set:
1. Retrieve the mapping set with a mapping ID.
2. Get information about the source and target sets.
3. Set the custom properties for this mapping set.
4. Set up the writer to write the mapping properties and the entire mapping set.
Example 7-17 shows a code snippet for exporting mappings with the web service API.
Example 7-17 Exporting mappings web service API code
RDValueSetRelationship map = RDMService.getRDValueSetRelationship(control, mapId, 0).getResponse();
 
RDValueSet sourceSet = RDMService.getRDValueSet(control, map.getSourceSetVersionIdPk(), 0).getResponse();
RDValueSet targetSet = RDMService.getRDValueSet(control, map.getTargetSetVersionIdPk(), 0).getResponse();
 
RDValueType sourceSetType = RDMService.getRDValueType(control, sourceSet.getDefaultRDValueTypeID(), 1).getResponse();
RDValueType targetSetType = RDMService.getRDValueType(control, targetSet.getDefaultRDValueTypeID(), 1).getResponse();
...
Exporting mappings with batch export commands
Exporting mappings with the InfoSphere MDM Ref DM Hub batch export command is similar to the export reference data sets process. In this example, you export the MDM To CRM States mapping that was created in “Creating a reference data set value manually” on page 175.
Example 7-18 shows the command to export a particular version of a mapping.
Example 7-18 An example of batch command to export a mapping
RunBatchExport.bat map="MDM To CRM States", state=Draft, version=1
 
 
White space: You must use a double quotation marks around a parameter value that contains a white space character, such as the map name value in Example 7-18.
The MDM To CRM States_Draft_1.csv file is exported to the path you configured in the RDMBatchExportClient.properties file.
Figure 7-45 shows the contents of the exported mapping in CSV format. All of the following items are exported: both the source code and the target code, both source and target custom property code, their names, the effective date, and the expiration date are exported.
Figure 7-45 The exported MDM To CRM States mapping CSV file
7.4 Customization
With InfoSphere MDM Ref DM Hub, you can customize both the server component and the web UI component. This section shows you how to customize the InfoSphere MDM Ref DM Hub for your own specific requirements. The following scenarios are typical customization scenarios:
Notification for reference data consumers
External business rule validation
The web user interface
7.4.1 Notification
The InfoSphere MDM Ref DM Hub can centralize and manage an organization’s critical reference data entities such as country, language, business units, and more. Some InfoSphere RDM reference architectures that are described in Chapter 2, “Solution reference architecture” on page 35 require the notification of external applications to synchronize to the reference data that is managed in the InfoSphere MDM Ref DM Hub.
In a tightly coupled system, the applications can connected to the InfoSphere MDM Ref DM Hub directly. However, as illustrated in Figure 7-46, changes applied to the data in the InfoSphere MDM Ref DM Hub are usually not directly sent to an application. Instead, an enterprise application integration (EAI) component is used to receive the change notification and distribute the event to all connected applications that are interested in the change.
Figure 7-46 Notification scenario
The necessary steps to send the change notification to WebSphere Enterprise Service Bus (ESB) are as follows:
1. Enable notifications in the InfoSphere MDM Ref DM Hub database.
2. Create a connected JMS topic in the ESB.
The JMS topic that is used to distribute the customer data is already defined in InfoSphere MDM Ref DM Hub. However, to receive this data in the ESB, a corresponding topic is required in WebSphere Enterprise Service Bus. The JMS topics must be connected. Using the connected topics, messages sent to the InfoSphere MDM Ref DM Hub topic can be received with the ESB topic.
3. Extend the InfoSphere MDM Ref DM Hub model with behavior extensions by using the Custom Domain Hub Workbench.
With a behavior extension, business logic can be executed before or after an InfoSphere MDM Ref DM Hub transaction. This extension can send a simple text message indicating the update of a InfoSphere MDM Ref DM Hub reference data set to the InfoSphere MDM Ref DM Hub topic, which forwards the notification event to the ESB.
Enabling notifications in the InfoSphere MDM Ref DM Hub database
To work with InfoSphere MDM Ref DM Hub notifications, you must enable the Custom Domain Hub notification mechanism by using the following steps:
1. Open a DB2 command window and connect to your Custom Domain Hub database (cdhdb) by using the following command:
db2 connect to cdhdb
2. Enable notifications at the application level by using the following command:
db2 update configelement set value='true', last_update_dt=current timestamp where name='/IBM/DWLCommonServices/Notifications/enabled'
3. Disconnect from the CDH database by using the following command:
db2 disconnect cdhdb
Creating a connected JMS topic in the ESB
To create a connection topic, set up the JMS on your ESB:
1. Open the Administration console of the Process Server and expand the Resources branch and the JMS branch.
2. Click Topics.
3. Select the scope:
 – For Node, enter the name of your WebSphere Application Server node.
 – For Server, enter server1.
4. Click New to add a new topic.
5. Ensure that the Default messaging provider is selected and click OK.
The Topic configuration panel opens (Figure 7-47 on page 215).
6. Enter MDMTopic for the name and com/dwl/base/notification/MDMTopic for the JNDI name of the topic.
7. Set the Topic name to notification/ElementChange, as defined by InfoSphere MDM Ref DM Hub.
8. Set the Bus name to other, please specify. For the Bus name, specify MDM.SIB.server1, as defined in InfoSphere MDM Ref DM Hub.
9. Set the Topic space to other, please specify. For the name of the origin Topic Bus destination, specify notification.ElementChange.
10. Click OK to confirm the changes and save the configuration.
Figure 7-47 ESB Configuration: Create JMS Topic in ESB
Creating and connecting the activation specification
Configure the activation specification for the JMS with the following steps:
1. Click Activation specifications.
2. Select the scope:
 – For Node, enter the name of your WebSphere Application Server node.
 – For Server, enter server1.
3. Click New to add a new activation specification (Figure 7-48).
Figure 7-48 Creating the activation specification
4. Ensure that Default messaging provider is selected and click OK.
The Activation Spec configuration panel opens.
5. Enter MDMTopicAS for the Name and jms/MDMTopicAS for the JNDI name of the activation specification.
6. For the Destination type, select Topic.
7. Set the Destination JNDI name to the JNDI name of the appropriate MDM Topic JNDI name as com/dwl/base/notification/ElementChange.
8. Set the Bus name to other, please specify. Specify MDM.SIB.server1 for the name of the origin MDM bus name.
9. In the Multi-entry Provider endpoints field, enter the MDM server destination in the following format, where port is the SIB_ENDPOINT_ADDRESS port of your InfoSphere MDM Ref DM Hub server:
host:port:chainname
Examples are as follows; the example in line two is for secured hosts:
mdmhost:7277:BootstrapBasicMessaging
mdmhost:7287:BootstrapSecureMessaging
10. Click OK to confirm the changes and save the configuration.
Extending InfoSphere MDM Ref DM Hub model with behavior extensions using the Custom Domain Hub Workbench
In this example, the behavior of the updateRDValueSet transaction is extended. In general, you can extend any transaction that is listed on the transaction reference page in the InfoSphere MDM Ref DM Hub information center:
To receive notification of data updates, you must create a Behavior Extension in MDM Server:
1. In the MDM Workbench, create a Hub Module project by selecting File  New  other and scrolling to the InfoSphere Master Information Hub folder. Select Hub Module project and click Next.
2. Fill the fields of the wizard page:
 – Project name: RDValueSetBehaviorExtensions
 – Base Java package name: com.example.mdm
 – Service namespace URI: http://example.com/mdm
 – EAR project name: MDM
 – Hub base name: MDM
 – Database schema name: db2admin
The schema name must be identical to the schema of the database user name you entered during DB2 installation with the Development and Test Environment wizard.
3. Click Finish to create the project.
4. Add the required behavior extensions:
a. Select the Model tab to switch to Hub Module model.
b. Click the PartyExtensions folder, then select New and click Behavior Extension.
c. Enter RDValueSetBehaviorExtensions in the Name field; in the Implementation field, be sure Java is selected.
d. Right-click RDValueSetBehaviorExtensions extension and select New  Action Event.
e. Enter UpdateRDValueSetEvent in the Name field and click Edit for the transaction.
f. Expand the model and select the updateRDValueSet event and click OK.
5. Click Validate model on the bottom. The following message is displayed:
Model validation complete: no problems found
If it does not appear, fix the error.
6. When all issues are resolved, click Generate Implementation. The Generating Code message is displayed and the extension code generation is started.
7. When the code generation is completed, open the RDValueSetBehaviorExtensions project and switch to ejbModule  com.example.mdmsap.behaviour. This is where you implement the extension by implementing the generated method stubs.
Implementing an extension to send notifications is simplified with the notification framework. implement the following class and return the message string to be sent in the getMessage() method:
com.dwl.base.notification.CommonNotification
Depending on your scenario, the returned message can be a computed string based on the currently processed model object or just represent a trigger for an application refresh.
Example 7-19 shows the code sample of sending the message.
Example 7-19 Sending message call
ServiceLocator serviceLocator = ServiceLocator.getInstance(); NotificationLocalHome home = (NotificationLocalHome) serviceLocator.getLocalHome(<TOPIC_JNDI_NAME>);
NotificationLocal theNotificationBean = home.create();
theNotificationBean.notify(theCommonNotification);
8. Make sure that the Project  Build automatically option is enabled. Refresh the project.
9. Update the class path by right-clicking the RDValueSetBehaviorExtensions project and selecting Properties. Now switch to Java EE Module Dependencies and look for the RDM.jar entry in the list. Select the check box next to RDM.jar file. Click OK.
10. Update the database with the generated behavior extensions:
a. Open a DB2 command window.
b. Change to the PartyExtensions esourcessqldb2 directory in your RSA workspace.
c. Run the RDValueSetBehaviorExtensions _MetaData_DB2.sql SQL script:
db2 connect to cdhdb
db2 -tvf RDValueSetBehaviorExtensions_MetaData_DB2.sql
db2 disconnect cdhdb
7.4.2 Services
You can customize InfoSphere MDM Ref DM Hub to inject validation rules or event notification for both before and after a transaction. You need the following development tools:
IBM Rational® Software Architect (RSA) V8.0.4
Master Information Hub Workbench Extension Development Tools V10.1
IBM WebSphere Application Server V8.0.*
This section describes the following tasks:
Set up a development environment for the InfoSphere RDM server projects in RSA.
Create a new InfoSphere Hub module project.
Setting up development environment for service customization
Complete the following steps:
1. Open RSA 8003 with a new workspace named C:IMRDMExtension.
2. Switch to J2EE perspective in RSA and make sure J2EE capability is enabled first.
3. Download the MDM-App.ear file from the RDM V10.1.* release (MIH-App.ear is for RDM V10 release).
4. Import MDM-App.ear into RSA by right-clicking to select import an EAR file and provide the project name MDM. Omit the following text because the code generation does not use the dash (-) character:
-App
5. Select only RDM.jar and RDMWS.jar in the utility wizard.
6. Select all EAR files on the second panel.
7. Create a general project named CustomerResources and click Finish.
8. Create an xsd folder under the CustomerResources project.
9. Extract the properties.jar file from the MDM-App.ear file to a properties folder.
10. Copy the properties folder to the CustomerResources project.
11. Extract the xsd and wsdl files from DWLSchemas.jar file in the MDM-App.ear to the xsd folder.
12. Two build errors are displayed, you can double-click each one to view:
 – Error one:
cvc-complex-type.2.4.a: Invalid content was found starting with element 'webApp'. One of '{"http://websphere.ibm.com/xml/ns/javaee":servlet, "http://websphere.ibm.com/xml/ns/javaee":default-error-page,
....
"http://websphere.ibm.com/xml/ns/javaee":enable-serving-servlets-by-class-name}' is expected. ibm-web-ext.xml /MDMWSProvider/WebContent/WEB-INF line 4 XML Problem
Double-click the error and you see that the error is caused by the following line; you can ignore this error message:
<webApp href="WEB-INF/web.xml#WebApp_ID"/>
 – Error two:
cvc-complex-type.4: Attribute 'userid' must appear on element 'run-as'. ibm-application-bnd.xml /MDM/META-INF in MDM line 7 XML Problem
You can correct this error by double-click the error message and changing <run-as/> to the following line:
<run-as userid=”” password=”{xor}”/> and save it .<run-as userid=”” password=”{xor}”/>
13. .Save the changes in the file.
Creating a new hub module project
Use the following steps to create a new InfoSphere MDM Ref DM Hub module in RSA:
1. Create a new InfoSphere MDM Ref DM Hub module by clicking File  New  Other  Hub Module Project.
2. Type a project name, for example, RDMCustomHub under the InfoSphere Master Data Management Server.
There are normally two errors in your workspace after you create a new InfoSphere MDM Ref DM Hub module.
The first error results because the newly created InfoSphere MDM Ref DM Hub module does not have a targeted runtime that is associated with it. You must manually add WebSphere Application Server V8.0 at run time.
The second error is as follows:
Errors occurred during execution
java.lang.NullPointerException
You must change the application.mdmxmi file under the MDM project to make sure that the name is MDM, which is same as the EAR file name. In our example, the assumption is that the EAR name was changed from MDM-App.ear to MDM when importing the MDM-App.ear file.
 
Note: If the EAR name differs from the name that is defined in application.mdmxmi, you receive the NULL pointer exception.
7.4.3 Callout and user exits
You can customize a callout or user exits for external business rule extension. When multiple business users are working on the same data from different geographies, data entered in InfoSphere RDM must be managed with a lifecycle management. InfoSphere MDM Ref DM Hub provides basic validation rules for simple string type data checks. For advanced data consistency checks, use an external business rule extension to accomplish this task.
For example, a custom reference data set property has a set of values that must be restricted with certain types of values, such as all values must have a prefix of 90, 92, or 94. Any other values should not be used by the container reference data set. You can implement this rule through the process of sending a request to append a reference data set for approval.
The basic steps for creating a user exit are as follows:
1. Create a behavior extension.
2. Generate implementation.
3. Run database scripts.
4. Deploy the MDM ear.
Creating a behavior extension
Before creating a behavior extension, you must add the RDM project to the RDMCustomHub dependency so that you can see all the InfoSphere MDM Ref DM Hub transactions.
Complete the following step to create a behavior extension:
1. Open the module.mdmxmi file from the newly created hub module, RDMCustomHub.
2. Open the model tab to create a new behavior extension by right-clicking RDMCustomHub  New  Behavior Extension, as in Figure 7-49.
Figure 7-49 Create a behavior extension
3. Enter a name for the behavior extension, such as preTest.
4. Create a new transaction event named preTestCheckup (Figure 7-50).
Figure 7-50 Create a transaction event
5. Set the transaction and the event type by selecting the Pre check box, as shown in Figure 7-51, and clicking Edit to enter the transaction name, updateRDValue. Click OK to complete the behavior extension.
Figure 7-51 Select a transaction to customise
6. Press Ctrl+S to save the changes.
Generating the implementation
Use the following steps:
1. Before generating the implementation, ensure no model error occurs.
2. Click Generate Implementation, which generates the code for you. Ensure no errors occur.
3. The PreTest.java class is generated for you. Open this Java file in your workspace to add the business logic for the validation rules.
In your workspace, you might have one XML problem in MDMWSProvider, but you can ignore it.
Running database scripts
Normally, two SQL scripts are created when an InfoSphere MDM Ref DM Hub module is created. The following scripts are examples:
RDMCustomHub_MetaData_DB2.sql
Rollback_RDMCustomHub_MetaData_DB2.sql
You must run RDMCustomHub_MetaData_DB2.sql before you update the MDM.ear file.
If you make any changes to the InfoSphere MDM Ref DM Hub module, you must run the rollback script before running the new MetaData script.
Deploying the new MDM EAR file
You can export the MDM or MIH EAR file and update the EAR through the WebSphere Application Server administration console. This method is quicker than doing it manually.
To do this method manually, complete the following steps:
1. Export RDMCustomHub to a JAR file by right-clicking on the project and then selecting Export  Java  Jar file.
2. Update the DWLCommonServicesEJB.jar file in the MDM-App.ear file with RDMCustomHub.jar and MANIFEST.MF files:
a. Extract the MANIFEST.MF file from the DWLCommonServicesEJB.jar file.
b. Add the RDMCustomHub.jar name in the MANIFEST.MF file.
3. Drop the DWLCommonServicesEJB.jar in the MDM-App folder, where MDM-App was initially installed.
4. Restart the MDM application from the WebSphere Application Server administration console.
7.4.4 User interface
InfoSphere MDM Ref DM Hub web UI has a custom page where you can customize your own UI. which can be implemented using HTML, JavaScript, or Java code. If you log in to the InfoSphere MDM Ref DM Hub web UI, you see the Custom Page tab on the navigation tab, as show in Figure 7-52.
Figure 7-52 Custom page for your customization
You can import the InfoSphere MDM Ref DM Hub client component EAR file, RDMClientEAR.ear, into your development environment (Rational Software Architect 8.0.4) and you can find the custom.inc.jsp file in the RDMClientWeb project under the WebContentpagescustom location.
For customizing the web UI, modify custom.inc.jsp by using InfoSphere MDM Ref DM Hub REST services.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset