Defining a master data creation process
This chapter explains how to construct a simple process-orientated master data management (MDM)-powered application by using IBM Business Process Manager Express. The business process is based on a simple customer onboarding scenario. This scenario demonstrates how to use BPM Express with Process Designer to build the user interface and integration points of an application. During construction of this business process, some of the capabilities in the InfoSphere MDM Application Toolkit are used with the capabilities in BPM Express to facilitate rapid construction of the application.
This chapter includes the following sections:
6.1 Overview of the example business process
By using the application that is built in this scenario, business users can search for customer records in their MDM system, which provides a list of search results. A user can then drill down into the search results and view the customer record in a hierarchal view by using the MDM Tree from the InfoSphere MDM Application Toolkit. The user can then manipulate the relationships for the customer record. The user can save any changes that are made to the customer record back to the MDM system by using the integration services from the InfoSphere MDM Application Toolkit.
During construction of this application, you use the MDM data types that are in the InfoSphere MDM Application Toolkit to display elements of your MDM data model within your application. You discover how to configure the MDM Tree widget to display hierarchical data within an MDM-powered application. You also use several of the MDM service integration nodes to integrate your business process with the rich services provided by the MDM engine.
The application was created by using InfoSphere Master Data Management Standard Edition V10.1 and the bundled version of IBM Business Process Manager Express V8.0. In this scenario, the environment is already available with this configuration in place.
To complete the scenario, you need the following extra configuration:
InfoSphere MDM Standard Edition v10.x instance with a sample individual domain deployed
For more information, see “Domain Templates” in the InfoSphere MDM Information Center at:
MDM Application Toolkit deployed to BPM Process Designer V8
REST interface of the InfoSphere MDM Application Toolkit deployed to the same IBM WebSphere Application Server instance as the BPM engine
For this scenario, you have full access to the configured environment, and all required MDM and BPM services are started. Also, the steps assume that you are familiar with the capabilities of the InfoSphere MDM Application Toolkit. For an overview of the capabilities of the toolkit, and for information about how to install it, see Chapter 5, “Introduction to the InfoSphere MDM Application Toolkit” on page 37.
6.2 Creating the business process definition
In the following exercise, a simple application is built that presents a search option so that a user can enter search criteria. The criteria is then submitted to the MDM engine to run a search. The user receives a list of search results from the MDM engine. This scenario is extended later with more exercises.
6.2.1 Creating a process application
In Process Designer, you see a list of existing process applications. To create a process application:
1. From the list of processes, on the right side, click Create New Process App (Figure 6-1).
Figure 6-1 Creating a process app
2. In the Create New Process App window (Figure 6-2), enter a process app name and an acronym. The click Create. The new process is now added to the list of available processes.
Figure 6-2 Enter a Process App Name and an Acronym
3. Click the Open in Designer link for your new process (Figure 6-3).
Figure 6-3 Open in Designer
The new process opens, and the Process App Settings page is displayed.
4. Import the InfoSphere MDM Application Toolkit:
a. From the menu on the left side, click the + icon next to the TOOLKITS category, as shown in Figure 6-4.
Figure 6-4 Select the plus (+) icon
b. In the pop-up window, under the MDM Application Toolkit category, select the 10.1 toolkit (Figure 6-5). This version number might be different if you have a different version of the InfoSphere MDM Application Toolkit installed. For this exercise, assume that V10.1 is installed.
Figure 6-5 Selecting the 10.1 MDM Application Toolkit
The MDM Application Toolkit capabilities are now added to your process.
5. Under TOOLKITS on the left, expand MDM Application Toolkit, and click All (Figure 6-6). All of the capabilities are displayed that are provided by the InfoSphere MDM Application Toolkit for usage within a business process. Several of these capabilities are used throughout the exercises in this book.
Figure 6-6 MDM Application Toolkit capabilities
6. To construct the Create Customer process:
a. Under ADD CUSTOMER, click the + button next to the Processes label (Figure 6-7). The Processes label is for the Create Customer category and not for the Processes label in the MDM Application Toolkit category.
Figure 6-7 Add Customer
b. In the Create New window (Figure 6-8), select Business Process Definition.
Figure 6-8 Selecting Business Process Definition
c. In the New Business Process Definition window (Figure 6-9), enter Create Customer. Then, click Finish.
Figure 6-9 Entering Create Customer in the new business process definition
An empty process definition is displayed. Swimlanes across the panel determine who is the actor for each part of the process. This scenario uses only the Participant swimlane, because one individual is using the process.
7. In the palette on the right side, select the Activity tool, and drag it to the Participant swimlane between the Start and End nodes. Give it a name of Add Customer.
8. In the palette on the right side, select the Sequence Flow Tool. Drag relationships from the Start node to the Add Customer node and from the Add Customer node to the End node.
Figure 6-10 shows how the business process looks.
Figure 6-10 New business process
9. Press Ctrl+S to save your business process.
6.2.2 Creating a human service
Next, you drill into the Add Customer node and add the steps to the business process. The process that is being created predominantly requires human interaction. Therefore, you create a human service to define flow within the Add Customer business process.
To create a human service:
1. Under ADD CUSTOMER in the left panel, click the + button next to User Interface (Figure 6-11).
Figure 6-11 Creating a human service
2. In the Create New window (Figure 6-12), select Human Service.
Figure 6-12 Selecting Human Service
3. In the New Human Service window (Figure 6-13), enter a name for the human service. In this example, we enter Add Customer UI Flow. Then, click Finish.
Figure 6-13 Enter a name for the Human Service of Add Customer UI Flow
A new blank canvas is created in Process Designer. This canvas is used to define the flow of the application window and the points at which the process will connect to the MDM engine to get or set data.
To build this flow, you use a coach.
4. Select the Coach control from the palette on the right side and drag it to the canvas. Enter a name of Search Customer, as shown in Figure 6-14.
Figure 6-14 Selecting the Coach control from the palette
This node represents the UI panel that is created when searching for a customer.
5. Select the Nested Service tool from the palette on the right side (Figure 6-15). Drag it to the canvas, and enter a name of Execute Search on MDM. You might need to use the down arrow key to scroll down to the bottom of the palette window to see the Nested Service tool.)
Figure 6-15 Selecting the Nested Service tool from the palette
This node represents a call to the MDM engine to run the search based on the criteria that are entered in the Search Customer UI window. After the call to search the MDM engine is completed, it returns a list of search results that need to show on another Coach UI node.
6. Select the Coach tool from the palette on the right side. Then, drag it to the canvas, and enter a name of Search Results. Figure 6-16 shows how the business process looks now.
Figure 6-16 The new search results business process
6.2.3 Defining variables
Variables represent the data objects that are used to pass data between each node in the process. Each time that you want to show data on a UI window or pass data between nodes, you must ensure that you have variables that are defined in the process to accommodate this objective.
To define the variables:
1. Create a variable to represent the search criteria that will be sent to the MDM engine. On the Variables tab at the top of Process Designer (Figure 6-17), click Add Private.
Figure 6-17 Creating a variable
2. Enter a name of CustomerSearchCriteria.
3. Under Variable Type, click Select, and click Individual type (Figure 6-18). This step ensures that the new variable created is of type Individual, which maps to the type that is represented in the MDM engine.
Figure 6-18 Variable type
4. Create a second variable to hold the search results that are returned from the MDM engine. Click Add Private to create a second private variable.
5. Enter a name of CustomerSearchResults.
6. For Variable Type, click Select, and select the Individual type (Figure 6-19). Because this variable will be used to store the list of results that are returned from the MDM engine, select the Is List check box to ensure that BPM anticipates a list of records.
Figure 6-19 Creating a second variable
7. Press Ctrl+S to save your work.
6.2.4 Building coach UI elements
Two coaches are now defined in the process. The first one allows a search to be performed, and the second one shows the list of search results that are returned from the MDM engine. Now you populate these coaches with the required UI elements:
1. Switch back to the Diagram tab at the top of Process Designer.
2. Double-click the Search Customer coach node. The coach designer opens, and a palette of tools is displayed on the right side of the canvas.
3. Expand the Variables folder at the bottom of the palette. You see the two variables that you created (in the previous section).
4. Expand the CustomerSearchCriteria variable. You now see all of the properties that are associated with it (because it is defined as type Individual).
5. Expand the LGLNAME attribute.
6. Click the onmfirst variable, and then drag it to the canvas. Click the onmlast variable, and then drag it to the canvas. See Figure 6-20.
Figure 6-20 Building coach UI elements
Because the onmfirst and onmlast variables are set as type of String, a field is added by default. These fields are bound automatically to the onmfirst and onmlast variables. If data in those variables changes, the values are displayed in these fields.
7. Click the onmfirst field on the coach, and then click the Properties tab (Figure 6-21).
Figure 6-21 Selecting the onmfirst field and Properties tab
8. Familiarize yourself with the properties on this tab. Change the Label to a name that is more user-friendly, such as First Name.
Notice the binding property is bound to CustomerSearchCriteria.LGLNAME.om first.
9. Click the onmlast field on the coach, and then in the Properties view, change the Label property to a value that is easier to remember, such as Last Name.
10. Expand the Control drawer on the palette.
11. Click the Button tool, and drag it to the canvas (Figure 6-22).
Figure 6-22 Dragging the Button tool
Button 1 becomes the button that moves the process to the next step and runs the search.
12. Click the Button in the coach, and in the Properties view, change the Label property to Search.
13. Press Ctrl+S to save your work.
The first search page is now complete, as shown in Figure 6-23.
Figure 6-23 Search results
14. Construct the coach to show the search results that are returned from the MDM engine:
a. Expand the Section drawer of the palette. Click the Vertical Section tool, and drag it to the canvas. Click the section on the canvas, and in the Properties view, change the Label to Search Result. See Figure 6-24.
Figure 6-24 Search Results
b. Expand the Control drawer of the palette, and select the Table tool. Drag it to the Search Results section, over the “Drop additional content here” text.
c. Select the new table on the canvas. Then, for Binding, click Select (Figure 6-25). Expand Local, and then expand Private. Double-click the CustomerSearchResults variable.
Figure 6-25 Select the new table
A table is now created that is bound to the CustomerSearchResults object. However, the table cannot detect which attributes to display in the table.
d. Expand the Variables drawer on the palette, and then expand the CustomerSearchResults object.
e. Expand the LGLNAME object.
f. Select the onmfirst attribute, and drag it to the table on the canvas.
g. Select the onmlast attribute, and drag it to the table on the canvas.
h. Expand the BIRTHDT object.
i. Select the attrVal property, and drag it to the table on the canvas.
j. Select the table. In the Properties view, change the Label properties for the table and the fields.
Figure 6-26 shows how the coach looks now.
Figure 6-26 How the coach looks now
15. Press Ctrl+S to save your work.
6.2.5 Building the integration service
Now that you have built the UI windows, you create the integration logic behind the Execute Search on MDM node within the process. IBM Business Process Manager can integrate with InfoSphere MDM through several different connection mechanisms as described in Chapter 4, “Integration approaches and proven practices” on page 27.
This section provides an example of the Java code that can be written to code a service between BPM and MDM Standard Edition. This example is of one mechanism that you can use to run transactions against an MDM engine from BPM.
By using BPM, you can upload custom files into a business process to be used as resources by the business process. BPM provides support for Java archive files (JAR) to be uploaded that contain custom Java code that can be started within a business process. The BPM Java Integrator node can then be configured to point to this custom code so that it can be run at a particular step in the process. This Java Integrator mechanism is used in this example.
In this scenario, you create a simple searchMDM method inside a new Java class. Example 6-1 shows how the MDM Standard Edition Java API can be called from an integration service and then return objects back to the BPM in the form of a TWList to represent a list of TWObjects. Use your integrated development environment (IDE) to create the Java class and export it from your IDE packaged as a JAR file.
Example 6-1 Exporting a Java class as a JAR file
public class MDSAdapter {
/** * * Executes a memSearch command against an MDM Standard Edition engine, passing in search criteria
* from a BPM process, and returns a list of search results in the form of a TWObject for consumption
* by a BPM process.
*
* TWList search(
* @param connectionInfo * @param searchInput
* @param entType
* @param minScore
* @param maxRows
* ) * * @return searchResults
* @throws Exception
*/
public TWList search ( Object connectionObj, Object searchInputObj,
String entType, Integer minScore, Integer maxRows ) throws Exception {
TWObject connection = ( TWObject ) connectionObj; TWObject searchInput = ( TWObject ) searchInputObj;
Context context = new Context( connection.getPropertyValue( "hostname"
).toString( ),
( Integer ) connection.getPropertyValue( "port" ), connection.getPropertyValue( "username" ).toString( ), connection.getPropertyValue( "password" ).toString( ) );
DicStore dicStore = new DicStore( context ); String segAttrFilter = "";
MemRowList inputRows = new MemRowList( ); MemRowList outputRows = new MemRowList( );
//MDM API mandates that there must be a MEMHEAD property.
MemHead memHead = new MemHead( 0, 0 );
populateMemRow( memHead, ( TWObject ) searchInput.getPropertyValue( "MEMHEAD" ) ); inputRows.addRow( memHead );
TWObject MEMHEAD = (TWObject)searchInput.getPropertyValue("MEMHEAD"); String srcCode = (String)MEMHEAD.getPropertyValue("srccode");
/*
* Iterate over all the properties in the input object.
* Each property should refer to an MDS attribute.
*/
Set< String > properties = searchInput.getPropertyNames( ); Iterator< String > i = properties.iterator( );
while ( i.hasNext( ) ) {
String attrCode = i.next( ); System.out.println("Attirbute code is " + attrCode); if ( dicStore.getSegAttrByCode( attrCode ) != null ) {
if ( segAttrFilter.length( ) > 0 ) {
segAttrFilter += ",";
}
segAttrFilter += attrCode;
TWObject attrObj = ( TWObject ) searchInput.getPropertyValue( attrCode );
MemRow memRow = dicStore.createMemAttrRowByCode( attrCode, memHead ); populateMemRow( memRow, attrObj ); inputRows.addRow( memRow );
}
}
IxnMemSearch memSearch = new IxnMemSearch( context ); memSearch.setEntType( entType ); memSearch.setMinScore( minScore.shortValue( ) ); memSearch.setMaxRows( maxRows ); memSearch.setRecStatFilter( "A,I" ); memSearch.setSegAttrFilter( segAttrFilter ); memSearch.setSegCodeFilter( "MEMHEAD,MEMATTRALL" );
boolean success = memSearch.execute( inputRows, outputRows, GetType.ASENTITY, SearchType.ASMEMBER );
if ( !success ) {
System.err.println( memSearch.getErrText( ) );
return null;
}
TWList resultsList = TWObjectFactory.createList( searchInput.getTWClassName( ) );
Map< ?, ? > entityMap = MemRowListUtils.getEntityMap( outputRows ); Iterator< ? > l = entityMap.keySet( ).iterator( );
while ( l.hasNext( ) ) {
Long entrecno = ( Long ) l.next( );
TWObject resultObj =
TWObjectFactory.createObject( searchInput.getTWClassName( ) );
Map< ?, ? > memberMap = ( Map< ?, ? > ) entityMap.get( entrecno ); MemRowList rowList = MemRowListUtils.getListFromMemberMap( memberMap );
RowIterator rows = rowList.rows( );
while ( rows.hasMoreRows( ) ) {
MemRow row = ( MemRow ) rows.nextRow( ); addProperty( resultObj, row );
}
 
}
int index = linearSearch( resultsList, resultObj ); resultsList.addArrayData( index, resultObj );
}
return resultsList;
}
protected void addProperty( TWObject resultObj, MemRow memRow ) {
// Only return the first value for any attribute
if ( resultObj.getPropertyValue( getAttrCode( memRow ) ) != null ) return;TWObject attrObj = null;
try {
attrObj =
TWObjectFactory.createObject( memRow.getRowSegCode( ).toUpperCase( ) ); }
catch ( Exception e ) {
e.printStackTrace( );
return;
}
SegDef segDef = memRow.getSegDef( );
for ( int i = 0; i < segDef.getFldDefCnt( ); i++ ) {
FldDef fldDef = segDef.getFldDefByNo( i );
String fieldname = fldDef.getFldName( ).toLowerCase( );try {
memRow.getDateAsDS( fldDef ) );
memRow.getInt( fldDef ) ); if ( fldDef.getFldType( ) == FldType.DATE ) {
attrObj.setPropertyValue( fieldname,
}
else if ( fldDef.getFldType( ) == FldType.INT ) {
attrObj.setPropertyValue( fieldname,
memRow.getLong( fldDef ) ); } else if ( fldDef.getFldType( ) == FldType.LONG ) {
attrObj.setPropertyValue( fieldname, ( int )
memRow.getShort( fldDef ) ); } else if ( fldDef.getFldType( ) == FldType.SHORT ) {
attrObj.setPropertyValue( fieldname, ( int )
memRow.getString( fldDef ) ); } else if ( fldDef.getFldType( ) == FldType.STRING ) {
attrObj.setPropertyValue( fieldname,
}
}
catch ( Exception e ) {
// An exception simply means that the BPM object does not use this
field,
// so just ignore it.
}
}
resultObj.setPropertyValue( getAttrCode( memRow ), attrObj );
}
protected String getAttrCode( MemRow memRow ) { if ( memRow instanceof MemHead ) { return "MEMHEAD";
}
else {
MemAttrRow attrRow = ( MemAttrRow ) memRow; return attrRow.getAttrCode( );
}
}
protected int linearSearch( TWList list, TWObject key ) { try {
TWObject keyHead = ( TWObject ) key.getPropertyValue( "MEMHEAD" ); int keyScore = ( Integer ) keyHead.getPropertyValue( "matchscore" );
for ( int i = 0; i < list.getArraySize( ); i++ ) {
TWObject item = ( TWObject ) list.getArrayData( i );TWObject itemHead = ( TWObject ) item.getPropertyValue( "MEMHEAD"
);
int itemScore = ( Integer ) itemHead.getPropertyValue( "matchscore"
);
if ( keyScore > itemScore )
return i;
}
}
catch ( Exception e ) {
}
return list.getArraySize( );
};
protected void populateMemRow( MemRow memRow, TWObject attrObj ) {
Set< String > fields = attrObj.getPropertyNames( );
Iterator< String > i = fields.iterator( );
while ( i.hasNext( ) ) {
String fieldname = i.next( );
Object fieldvalue = attrObj.getPropertyValue( fieldname );
FldDef fldDef = memRow.getSegDef( ).getFldDefByName( fieldname );
if ( fldDef != null ) {
try {
if ( fldDef.getFldType( ) == FldType.DATE ) { memRow.setString( fldDef, fieldvalue.toString( ) );
}
else if ( fldDef.getFldType( ) == FldType.INT ) { memRow.setInt( fldDef, ( Integer ) fieldvalue );
}
else if ( fldDef.getFldType( ) == FldType.LONG ) { memRow.setLong( fldDef, ( Integer ) fieldvalue );
}
else if ( fldDef.getFldType( ) == FldType.SHORT ) {
memRow.setShort( fldDef, Short.parseShort( fieldvalue.toString( ) ) );
}
else if ( fldDef.getFldType( ) == FldType.STRING ) { if(fldDef.getFldName().equalsIgnoreCase("attrVal")
&& fieldvalue.toString().equals("")){
memRow.setString(fldDef, "X");
}else{
memRow.setString( fldDef,
fieldvalue.toString( ) );
}
}
}
catch ( Exception e ) {
e.printStackTrace( );
}
}
}
}
}
Importing the integration service into your process
After you write your Java integration service and it is packaged in a JAR file, import it into your process:
1. Click the + button next to the Files category on the palette on the left.
2. In the window that opens, navigate to the JAR file that you created that contains your search service.
The JAR file and the search service are now available to be used by the process.
The Execute Search on MDM node calls the searchMDM Java service to run a search and bring back a list of search results.
3. From the palette on the left side, click the + button next to Implementation. Select Integration Service (Figure 6-27).
Figure 6-27 Search results
4. Enter a name of SearchMDM for your new Integration Service, and then click Finish (Figure 6-28).
Figure 6-28 Enter a name
A new blank canvas opens so that you can define the integration components.
Defining the integration components
To define the integration components:
1. Click the Variables tab at the top of the editor.
2. Create a private variable to hold the details for connection into the MDM engine (Figure 6-29):
a. Click Add Private.
b. Enter a name of connectionDetails.
c. Click Select and select the type MDM_Connection from the window.
d. Select the Has Default check box.
Figure 6-29 Define the integration components
The InfoSphere MDM Application Toolkit made available the MDM_Connection type that you selected.
You selected the Has Default check box to allow use of this editor to specify default values. In this exercise, the connection details that are required by the MDM engine are hardcoded.
3. Specify the default values for the connectionDetails variable you created, as shown in Figure 6-30.
hostname The host name of your MDM Standard Edition server (can be “localhost”).
port The port on which your MDM Standard Edition server is running (default is 16000).
username The administrator user name of your MDM engine.
password The administrator password of your MDM engine.
serverType The type of InfoSphere MDM server you are using (MDS for standard or MDMS for advanced).
Figure 6-30 Specify the default values
4. Create an input variable to store the search criteria that is passed to the integration node from the search window:
a. Click Add Input.
b. Enter a name of CustomerSearchCriteria.
c. Under Variable Type, click Select, and click Individual (Figure 6-31).
Figure 6-31 Creating an input variable
5. Create an output variable to store the search results that are returned from the call to the MDM engine to allow these results to be passed into the second coach window (Figure 6-32):
a. Click the Add Output variable.
b. Enter a name of CustomerSearchResults.
c. Under Variable Type, click Select, and then click Individual.
d. Select the Is List check box.
Figure 6-32 Creating an output variable
6. Press Ctrl+S to save your work.
7. Click the Diagram tab at the top of the page to return to the blank canvas.
8. Add the integration node that will call a service on the MDM engine and return the search results (Figure 6-33):
a. From the palette on the right side of the canvas, click the Java Integration tool, and drag it to the canvas.
b. Select the new node on the canvas.
c. In the Properties window, at the bottom of the canvas, enter the name Call MDM.
Figure 6-33 Enter a name
9. Configure the Java integration node to point to the searchMDM service on the MDM engine:
a. With the Call MDM node selected, click the Definition tab.
b. Click Select from the Java Class Property.
c. In the window that opens, expand the JAR file you uploaded previously, and select the class that contains your searchMDM method (Figure 6-34).
Figure 6-34 Select the class method
10. For Method, select the TWList search(Object, Object, String, Integer, Integer) method (Figure 6-35). Alternatively, select the name of your method if you did not use the code sample.
Figure 6-35 Select the TWList search
The integration node is now configured to call the search service.
Defining the variables to pass in and out of the call to MDM
Define the variables for the integration node to pass in and out of the call to the MDM engine:
1. In the Properties view, click the Data Mapping tab.
The search method that is selected expects five parameters to be passed into it. BPM provides five fields to represent these five parameters.
In this example, the parameters to be passed into the searchMDM service are the parameters that were passed into the searchMDM method from the code sample that is shown in Example 6-1 on page 82. If you write your own search service, you might have different parameters to pass in to the service.
2. Next to Parameter 1, click the icon.
3. In the pop-up window, double-click the connectionDetails variable:
! SearchService-SelectConnectionDetailsVariable.png!
This variable passes the host name and authentication credentials into the service.
4. Next to Parameter 2, click the icon.
5. In the pop-up window, double-click the CustomerSearchCriteria variable. This variable passes the search criteria into the search service.
6. For Parameter 3, enter "id" in the field (including the quotation marks (" ")). This value indicates to the search service the type of MDM entity to search on. This value might be different depending on your MDM hub configuration. Assume that the Individual domain supplied as a sample with MDM Standard edition is used.
7. For Parameter 4, enter 0 in the field. This value indicates to the search service the minimum match score to use in the search service.
8. For Parameter 5, enter 10 in the field. This value indicates to the search service the number of results to return from the MDM engine.
Setting the output mapping
Set the output mapping. This task is required to map the search results that are returned from the service to the local variable created to store the search results.
1. For the Return Value property, click the icon. In the pop-up window, double-click the CustomerSearchResults object. Figure 6-36 shows how the Data Mapping tab looks now.
Figure 6-36 The Data Mapping tab
2. To complete the integration service, connect the nodes (Figure 6-37):
a. Click the tool from the palette on the right side.
b. Draw a relationship from the Start node to the Call MDM node.
c. Draw another relationship from the Call MDM node to the End node.
Figure 6-37 Complete the integration service
3. Press Ctrl+S to save your work.
6.2.6 Connecting the UI coaches and integration service
Now that the UI coaches are built and the integration service is defined, join them together and pass the variables between each node:
1. From the palette on the left side, under ADD CUSTOMER, click User Interface. Then, in the window that opens, under Human Service, double-click Add Customer UI Flow (Figure 6-38).
Figure 6-38 Select the Add Customer UI Flow human service
2. Configure the Execute Search on MDM node to point to the SearchMDM Service (Figure 6-39):
a. Switch back to the Diagram view.
b. Click Execute Search on MDM node from the diagram.
c. From the Properties view at the bottom of the window, click the Implementation tab.
d. Next to Attached Nested Service, click Select.
e. In the pop-up window, select the SearchMDM integration service.
Figure 6-39 Select the integration service
The Execute Search on MDM is now pointed to the Search MDM integration service, which calls the Java class to run a search on the MDM engine.
3. Join each node of the Human Service together.
a. Select the palette on the right side.
b. Create the following relationships:
 • Join the Start node with the Search Customer node.
 • Join the Search Customer node with the Execute Search on MDM node.
 • Join the Execute Search on MDM node with the Search Results node.
You do not need to join the Search Results node to the End node because a button is not defined on the Search Results coach to go anywhere. Figure 6-40 shows the Human Service now.
Figure 6-40 The human service
4. From the Human Service, define which of the local variables to pass in and out of the Execute Search on the MDM node:
a. Click the icon at the top of the palette to switch back to the selection mode.
b. Click Execute Search on the MDM node.
c. In the Properties view, click the Data Mapping tab.
On the Data Mapping tab, two properties are defined, one for the Input Mapping and one for the Output Mapping. These properties are displayed because in the SearchMDM integration node was defined as an Input and Output variable. Now map these properties to variables that exist in the Human Service.
i. Click the Input Mapping icon.
ii. Double-click the CustomerSearchCriteria variable.
iii. Click the Output Mapping icon. Double-click the CustomerSearchResults variable.
With these mappings defined, the search criteria that is entered into the Search Customer coach is passed to the Execute Search on to MDM integration service. In addition, the search results that are returned from the integration service are passed to the Search Results coach.
5. Press Ctrl+S to save your work.
6.2.7 Running the process
The process is now complete and you can test it in the Process Designer. Process Designer provides a fast way to run and test new processes immediately, rather than requiring you to install the process to a BPM instance.
1. Click the icon in the upper right corner of the Process Designer. Your web browser opens, showing the Search Customer coach window.
2. In the Search Customer coach window:
a. In the FirstName field, enter Anna.
b. In the LastName field, enter Franklin.
c. Click Search.
 
Customer name: Anna Franklin is the name of a customer that exists in the Individual data set that provided with InfoSphere MDM Standard Edition. If you are not using the data set that comes with InfoSphere MDM Standard Edition, you must enter the name of customer that exists in your data set.
The list of search results is then returned from the MDM engine and shown in the second coach.
For this scenario, the focus is on the integration between MDM and BPM, and not on how the windows look and function. By using Process Designer, you can design and build coach windows that have all the design aspects that are required of a typical business application.
If no search results are returned from the server, an error occurred. The error might be as simple as no data was found in the MDM engine that matched the search criteria. In this case, confirm that the data exists in your hub by using the IBM Initiate Inspector application. For more information about IBM Initiate Inspector, go to:
For a list of error codes, see “Error codes for IBM Initiate® Enterprise Viewer” in the IBM Initiate Master Data Service, Version 9.5 Information Center at:
6.2.8 Checkpoint
The tasks in 6.2, “Creating the business process definition” on page 63, demonstrate how to build a simple business process that interacts with master data, by using IBM Business Process Manager and IBM InfoSphere MDM. You built a simple search and search results window and connected them together by using variables that represent the shape of the master data. You used the Individual object that is provided by the InfoSphere MDM Application Toolkit to work with the MDM objects within BPM. You also saw how to write and package a simple search service inside a JAR file to include in your process. Next, you use the MDM Tree widget, provided by the InfoSphere MDM Application Toolkit, to provide a hierarchical view of the customer data.
6.3 Integrating the business process with MDM by using the MDM Tree
In this section, first you extend the process so that a user can select a customer record from the search results. Then, you display that record in a window by using the MDM Tree widget that is provided by the InfoSphere MDM Application Toolkit for BPM.
6.3.1 Extending the existing human service
To extend the existing Add Customer UI Flow human service with a new coach view to display the selected customer record and the MDM Tree:
1. From the Diagram tab in the Add Customer UI Flow human service, click the Coach tool from the palette on the right side of the window, and drag it to the canvas.
2. Enter a name of View Customer Details, as shown in Figure 6-41.
Figure 6-41 Add Customer UI Flow human service
3. Use a component from the Application toolkit to display the selected customer record in the hierarchy.
4. Click the Nested Service tool from the palette on the right side, and drag it to the canvas.
5. Enter a name of Build MDM Entity. You might need to scroll down in the palette window to see the Nested Service tool.
6. On the Implementation tab from the palette view, for Attached Nested Service, click Select. Select the Get MDM Entity Integration service (Figure 6-42).
Figure 6-42 Use a component from the Application Toolkit
6.3.2 Configuring the nested service
By using the Get MDM Entity service, you can pass in the selected Customer record. You can make an extra call into the MDM engine to retrieve all of the relationship data for that customer and return it in a format that can be use by a hierarchy widget. This capability demonstrates the power that the InfoSphere MDM Application Toolkit brings to application developers. They do not need to make extra calls to MDM to retrieve the correct relationship data nor manually convert the data into the format for the hierarchy. The Get MDM Entity service that is provided by the InfoSphere MDM Application Toolkit does these tasks already.
Now you must configure the service. For this exercise, the properties that are required by the Build MDM Entity are hardcoded. Typically, the variables are defined to pass in the correct properties.
Create a variable to store the data that is returned from the Get MDM Entity service in the format that is required by the hierarchy widget:
1. On the Variables tab, click Add Private.
2. Enter a name of SelectedCustomer.
3. Click Select, and then set the Variable Type to MDM Entity (Figure 6-43).
Figure 6-43 Configuring the nested service
4. Switch back to the Diagram view.
5. Click the Build MDM Entity node.
6. In the Properties view, on the Data Mapping tab:
a. For service, enter "MDSService" in the field (including the " ").
This value indicates to the Get MDM Entity service which service on the embedded REST interface to call. By default, the REST interface comes preconfigured with sample services, one for MDM Standard Edition and one for MDM Advanced Edition. In this exercise, the default service for InfoSphere MDM Standard Edition is used.
b. For type, enter "id" in the field (including the " ").
This value indicates to the Get MDM Entity service the entity type that you want returned from the MDM engine. The id entity relates to the default entity type that is specified by the Individual domain that comes with InfoSphere MDM Standard Edition. If you are using a custom domain, specify your chosen entity type here.
7. Next to the id attribute, the icon.
8. In the pop-up window, expand Private  CustomerSearchResults  listSelected  MEMHEAD  entrecno (Figure 6-44).
 
Important: Navigate to the listSelected level and not to the top level because MEMHEAD is displayed on two levels.
Figure 6-44 Navigating from private to entrecno
9. In the id field, add ""+ to the beginning of the ID to convert the entrecno Integer into a String as required by the Get MDM Entity service. The edited the field value now looks like the following example:
""+tw.local.CustomerSearchResults.listSelected.MEMHEAD.entrecno
This property contains the MDM entity id of the customer record that was selected by the user in the previous step.
10. For port, enter "9080" in the field (including the " ").
This value indicates to the Get MDM Entity service the port number that the embedded REST interface is running on. The value 9080 is the default port. You might need to change this port to suit your BPM configuration.
11. For contextRoot, enter "MDMAT_BPM_REST" in the field (including the " ").
This value indicates to the Get MDM Entity service the location (context root) of the embedded REST interface. This value is the default value that is provided by the REST interface. If you changed the default context root, specify the new value here.
12. On the Output Mapping, click the icon for response property.
13. In the pop-up window, click the SelectedCustomer variable (Figure 6-45).
Figure 6-45 The SelectedCustomer variable
Figure 6-46 shows how the data mappings look now.
Figure 6-46 The Date Mappings
14. Press Ctrl+S to save your work.
6.3.3 Configuring the MDM Tree
Next, you build the new View Customer Details coach by adding the MDM Tree widget, provided by the InfoSphere MDM Application Toolkit for BPM, to display the customer record:
1. Open the View Customer Details coach designer.
2. From the palette on the right side, expand the MDM drawer. Select the MDM Tree tool and drag it to the canvas.
3. With the Tree selected, in the Properties view, click the Configuration tab. For the rootNode property, click Select.
4. From the pop-up window, double-click SelectedCustomer (Figure 6-47).
Figure 6-47 Configure the MDM Tree
Double-clicking the Selected Customer option signals the MDM Tree to set the root entry of the tree to the MDM Entity that is stored in the SelectedCustomer variable. The SelectedCustomer variable is the Customer record is the Customer record that was selected by the user in the previous window.
5. Set the URL property for the MDM Tree to MDMAT_BPM_REST. This property indicates to the MDM Tree the location of the underlying REST interface when lazy loading data when a user expands a node on the tree.
You can specify several other properties on the tree, but they are beyond the scope of this scenario. The other properties can be used to configure such capabilities as lazy loading of the tree.
6.3.4 Connecting the nodes with the service
Before you run and test the process, join all of the nodes within the Human Service:
1. Create a button on the Search Results coach so that the process can move on to the new View Customer Details coach inside the existing Search Results section.
2. Double-click the Search Results coach.
3. Select the Button tool from the palette and drag it to the canvas.
4. In the Properties view, on the General tab, rename the button to View Selected Customer (Figure 6-48).
Figure 6-48 The View Selected Customer button
5. Switch back to the Diagram view.
6. Select the tool from the palette on the right side.
7. Create the following relationships:
 – Join the Search Results node with the Build MDM Entity node.
 – Join the Build MDM Entity node with the View Customer Details node.
Figure 6-49 shows the completed Human Service.
Figure 6-49 The completed Human Service
8. Press Ctrl+S to save your work.
9. Copy the mdmbpm.zip file from the InfoSphere MDM Application Toolkit into the local process. This compressed file contains the MDM Tree JavaScript code. Because of a defect, cannot be in the toolkit. Therefore, you must copy this file locally to your process application.
a. From the palette on the left, under the TOOLKITS category, expand MDM Application Toolkit and select the Files category.
b. In the pop-up window, right-click the mdmbpm.zip file.
c. In the pop-up window, click Copy Item to  Other Process App.
d. In the pop-up window, select your process app from the list of process applications.
6.3.5 Running your process
Now that the process is complete, you can test it in Process Designer:
1. Click the icon in the far upper-right corner of the Process Designer. Your web browser opens.
2. In the Search Customer coach window:
a. In the FirstName field, enter Anna.
b. In the LastName field, enter Franklin.
c. Click Search.
 
Customer name: Anna Franklin is the name of a customer that exists in the Individual data set that provided with InfoSphere MDM Standard Edition. If you are not using the data set that comes with InfoSphere MDM Standard Edition, you must enter the name of customer that exists in your data set.
The list of search results is then returned from the MDM engine and displayed in the second coach.
3. In the results table, select a row and click View Selected Customer. The MDM Tree loads, showing the attributes of the selected customer record.
4. Expand the nodes of the hierarchy.
5. Click the Options menu in the upper right corner of the window to show or hide the categories in the hierarchy.
6.3.6 Checkpoint
In this section, you extended the search application to use the MDM Tree that is provided by the InfoSphere MDM Application Toolkit to display a hierarchical view of the customer data. You used the Get MDM Entity service that is provided by the InfoSphere MDM Application Toolkit to populate the MDM Tree and convert the selected record into a hierarchical format that is required to display that customer in a tree. By using the data types that are provided by the InfoSphere MDM Application Toolkit, you can work with the MDM data within the BPM environment in a simple and intuitive manner.
The last section of scenario expands the process further to capture the changes that a user might make to the entity that displayed in the tree and to persist those changes back to the MDM engine. This process takes advantage of another prebuilt integration node that is provided by the InfoSphere MDM Application Toolkit.
6.4 Extending the process to save updates to an entity
In this section, you further extend the process to persist any changes that are made to the data within the MDM Tree back to the MDM engine. The InfoSphere MDM Application Toolkit includes two prebuilt integration services so that you can save changes that are made to an MDM Tree back to the MDM engine. These prebuilt integration nodes handle the complexities of determining which services on the MDM engines to call to reflect the changes that are made to the MDM hierarchy.
The steps in this section use the Save MDS Tree integration service because the MDM Standard Edition is used. If you use MDM Advanced Edition, you would use the Save MDMS Tree integration service.
6.4.1 Extending the process
To extend the process:
1. Open the Add Customer UI Flow Human service, and click the Diagram tab. Extend this flow with a nested service that will point to the Save MDS Tree integration service.
2. From the palette on the right side, click the Nested Service tool and drag it to the canvas. Enter a name of Save Tree.
3. With your new node selected, from the Properties view, click the Implementation tab (Figure 6-50 on page 108).
4. For Attached Nested Service, click Select. In the pop-up window, select the Save MDS Tree integration service that is provided by the MDM Application Toolkit.
Figure 6-50 The MDS Tree integration service that is provided by the MDM Application Toolkit
6.4.2 Creating variables to hold the properties
Now, you create variables to hold the properties that are needed to pass into the new integration service. First, create a variable of type MDM_Tree. This type stores all the changes that are made by the user to the data that is stored in the MDM Tree on the user interface and is passed into the Save Tree service. The Save Tree service then uses the stored data to determine which services to call on the MDM engine to persist the changes that are made by the user.
To create the variables:
1. Switch to the Variables tab.
2. Click Add Private to create a private variable, and enter a name of Tree Data.
3. For Variable type, click Select, and select MDM_Tree provided by the MDM Application Toolkit (Figure 6-51).
Figure 6-51 Creating a variable of type MDM_tree
6.4.3 Creating a connection variable
Next, create a connection variable. The connection variable contains the connection details of the MDM engine to be called to persist the changes that are made by the user.
To create a connection variable:
1. Click Add Private.
2. Enter a name of connection.
3. For Variable Type, click Select, and select MDM_Connection (Figure 6-52).
Figure 6-52 Creating a connection variable
4. Select the Has Default check box, and enter the following values (Figure 6-53):
hostname The host name of your MDM Standard Edition server (can be "localhost").
port The port on which your MDM Standard Edition server is running. The default is 16000.
username The administrator user name of the MDM engine.
password The administrator password of the MDM engine.
serverType The type of InfoSphere MDM server that is being used (MDS for standard or MDMS for advanced).
Figure 6-53 Defining the default variables
5. Pass the new variables that you defined to the Save Tree node on the process diagram:
a. Switch back to the Diagram view.
b. Select the Save Tree node.
c. In the Properties view (Figure 6-54), on the Data Mapping tab, click the icon next to the tree variable.
d. In the pop-up window, select the TreeData variable that you created.
Figure 6-54 The TreeData variable
e. Click the icon next to the connection variable.
f. In the pop-up window, select the connection variable that you created (Figure 6-55).
Figure 6-55 The connection variable
6.4.4 Binding a variable to the MDM Tree
The service integration node is now configured to save the changes that are made to the MDM Tree by a user. However, the TreeData variable that was created is not linked to the MDM Tree on the user interface.
To bind them together:
1. Open the View Customer node.
2. In the coach designer window, select the MDM Tree.
3. In the Properties view (Figure 6-56), on the General tab, next to the Binding property, click Select. In the pop-up window, select the TreeData variable that you created previously.
Figure 6-56 Linking the MDM Tree on the user interface
4. Add a Save button so that a user can save the changes that are made to the MDM Tree:
a. From the palette on the right side, expand the Control drawer and drag a button to the page designer.
b. Click the new button, and on the Properties tab, change the label to Save.
The MDM Tree control is now bound to the TreeData variable. Any changes that are made by a user to the data displayed in the MDM Tree widget are now stored in the TreeData variable. When a user clicks Save, the process passes this TreeData variable into the Save Tree integration service and persists the changes that are made by the user to the MDM engine.
6.4.5 Joining the process flow steps
To join the process flow steps together:
1. Switch back to the Diagram tab.
2. Select the tool from the palette on the right side.
3. Draw a relationship from the View Customer Details node to the Save Tree node. With the new relationship selected, in the Properties view, click the Line tab.
4. Ensure that End State Binding is set to the Save button (Figure 6-57). If it is not, click Select, and then click Save in the pop-up window.
Figure 6-57 End Sate Binding
5. Create a relationship from the Save Tree node to the End node.
Figure 6-58 shows the completed process flow.
Figure 6-58 The completed process
6.4.6 Running the process
The process is now complete and can be tested within the Process Designer. To run the process:
1. Click the icon in the far upper-right corner of the Process Designer. Your web browser opens.
2. In the Search Customer coach window:
a. In the FirstName field, enter Anna.
b. In the LastName field, enter Franklin.
c. Click Search.
 
Customer name: Anna Franklin is the name of a customer that exists in the Individual data set that provided with InfoSphere MDM Standard Edition. If you are not using the data set that comes with InfoSphere MDM Standard Edition, you must enter the name of customer that exists in your data set.
The MDM engine returns a list of search results, which are displayed in the second coach.
3. Select a row in the results table, and then click View Selected Customer. When the MDM Tree loads, it shows the attributes of the selected customer record.
4. Expand the nodes of the hierarchy.
5. Drag the nodes to other parent nodes so that you manipulate the data in the hierarchy. Also, try deleting a node from the hierarchy.
6. After complete your changes, click Save. Your changes are then committed to the MDM engine.
7. Close your web browser, and run the process again. This time when you view the data in the hierarchy, you see the changes that you made.
6.4.7 Checkpoint
In this final section of the scenario, by using the integration services, you saw how to quickly extend the process so that changes to an MDM Tree can be persisted back into the MDM engine. The integration services handled the complexities about which services to call to reflect those changes on the MDM engine. The steps in this section demonstrated the configuration-based approach that BPM, MDM, and the InfoSphere MDM Application Toolkit offer to organizations that are looking to build process-orientated MDM powered applications.
6.5 Data stewardship processes within enterprise processes
This section highlights the use of data stewardship processes within enterprise processes.
6.5.1 Enterprise processes
Enterprise-wide processes include the following examples:
Go to market
 – Use customer insights for target marketing
 – Dynamic pricing
Order to cash
 – Account opening process automation
 – Automated order processing and fulfillment
Product development
 – Reduce time to market of new products and services
 – Streamline production procurement sourcing
IBM Business Process Manager Advanced (BPM Advanced) supports the creation and implementation of enterprise-wide business processes. BPM Advanced includes a Business Process Execution Language (BPEL) engine and WebSphere Integration Designer for easy definition of processes by using enterprise-wide web services. For more information about IBM IBM Business Process Manager Advanced, go to:
6.5.2 Integration of enterprise and MDM governance processes
Often MDM data governance-based processes can form a subset of tasks that make up part of greater enterprise-wide process, providing a vital role in the fundamental processes that run the wider organization. IBM InfoSphere MDM includes IBM Business Process Manager Express (BPM Express) to define and manage MDM governance-based processes.
Processes for BPM Advanced can call into processes for BPM Express so that an MDM data governance-based process can participate in wider processes. After you define the BPM Express process, you can import it into BPM Advanced Integration Designer. The entry and exit points for that process can then be integrated into the processes for BPM Advanced. The integrated process can then operate on a request-response model, where the BPM Advanced process starts the BPM Express process before waiting for a response. Alternatively, the integrated process operates on a request-only model, where the BPM Advanced process starts the BPM Express process and continues with the next steps in the process.
For more information about how BPM Express processes can integrate with BPM Advanced processes, see IBM Business Process Manager V8.0 Information Center at:
At run time, when the BPM Advanced process is running, the BPM Advanced Engine initiates a call to start the BPM Express process. This call is initiated by using Service Component Architecture (SCA) over Internet Inter-ORB Protocol (IIOP) as illustrated in Figure 6-59.
Figure 6-59 Starting the BPM Express process by using SCA over IIOP
6.6 Summary
This scenario demonstrated some of the capabilities that are provided by InfoSphere MDM Application Toolkit. The tasks showed how to use IBM Business Process Manager Process Designer to build an application that operates against mastered data that is stored in IBM InfoSphere MDM Standard Edition.
By using tools in the InfoSphere MDM Application Toolkit, you learned how to build process-orientated MDM powered applications that are based on a combination of drag-and-drop editing and wizard-based configurations. You saw how to use the prebuilt MDM data types, MDM integration services, and the MDM tree that is provided by the InfoSphere MDM Application Toolkit to build the application without any coding. This approach follows an iterative development process that facilitates greater buy-in from business users and lends itself to being incorporated into an Agile development project.
By using IBM InfoSphere MDM, you can simply and quickly build an MDM powered application without writing code. In addition, with InfoSphere MDM, you can place mastered data in the hands of business users and increase the return on investment of master data projects.
..................Content has been hidden....................

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