WebSphere Process Server relationship service: Efficiently manage static relationship instance data

This article shows you how to create, delete, export, and import a large amount of static relationship instance data during both application authoring time in WebSphere® Integration Developer and runtime in the administrative console's relationship manager in WebSphere Process Server.

Share:

Jun Jie Nan (nanjj@cn.ibm.com), Advisory Software Engineer, IBM

Photo of Jun Jie NanJun Jie Nan is an Advisory Software Engineer in the IBM China Development Lab, focusing on data mapping in SOA.



Hong Mei Li (lihmcdl@cn.ibm.com), Software Engineer, IBM

Photo of Hong Mei LiHong Mei Li is a Software Engineer in the IBM China Development Lab.



20 October 2010

Also available in Chinese

Introduction

IBM® WebSphere Process Server (hereafter called Process Server) relationship service can correlate values that might be different, but have the same semantic meaning. Two primary relationship types exist: dynamic and static. You can populate the static relationship in WebSphere Integration Developer (hereafter called Integration Developer) with instance data predefined. Once you put the static relationship into use, you can update the static relationship instance data through the administrative console's relationship manager.

The static relationship instance data is business data, which is more familiar to business people than to developers or administrators. Integration Developer is designed for developers, while the admin console's relationship manager is designed for administrators. Business people know business data well, but might not know how to use Integration Developer or the relationship manager of the admin console. Likewise, developers or administrators are good at technical-related issues, but might not have a good grasp on business data.

WebSphere Process Server V7 provides the static relationship instance data import and export function to solve the business versus technical issue mentioned above. Figure 1 illustrates the relationship instance data import and export scenario.

Figure 1. Scenario of relationship instance import and export
Scenario of relationship instance import and export

Business people can use the new import and export function to define the static relationship instance data file in the editor of their choice, such as Microsoft® Excel or OpenOffice. After that, they just need to deliver the data file to developers who can help them to import it into Integration Developer, or deliver it to administrators who can import the data into the Process Server runtime.


Business scenario

Let's create a business scenario that assumes IBM has three different enterprise systems with a representation of the customer. The IBM IT organization has determined the need to integrate these three systems and provide a single composite canonical representation of the customer inside a Customer Relationship Management (CRM) hub that enables customer relationship business processes to be developed independently of the existing enterprise information systems (EIS).

Each enterprise system - Global, SAP®, and a DB2® relational database - all have a customer representation that includes an address property named "state" that represents a U.S. state (this example is not internationalized). However, each of these three systems has a different value representation for each state. For example, to represent the state of California, the DB2-based system uses "California," while the SAP system uses "CA-03," and the SSA Global system uses "Cal." In this scenario, the canonical or generic representation of the customer uses the official two-letter acronym (for example, "CA" for California).

Table 1 shows an example of the relationship data.

Table 1. Relationship data
# ABBR JDBC SAP SSA
1 CA California  CA-03 Cal
2 TX Texas TX-19 Tex
3 AZ Arizona AZ-02 Ari
... ... ... ... ...
50 NV Nevada NV-17 Nev

Let's say the table was created by a business person, Lisa. After she finished the data collecting, she delivered the table to a developer, Jim. Jim planned to manually type the data into the table. There are so many data values, however, and he thought a manual input was not effective. He started to investigate an easier way to do it and found the relationship instance data import function.

After he completed the task in seconds, he delivered the application to system administrator Ted. Ted deployed the application and put the application in use. Lisa found some minor mistakes in the relationship instance data in the WebSphere Process Server runtime. She pushed Ted to correct the mistakes several times, but there were always some uncorrected errors left.

It's not Ted's fault. Ted is a good system administrator who can control and run a smooth and stable system, but he is not good at correcting typo errors. After some investigation, Ted finally decided to use the relationship instance data export function to export the file, which was delivered to Lisa who corrected all the mistakes. He then imported the modified file back into the Process Server runtime. Ted is good at the admin part, and Lisa is better on the business side. Task completed.


Creating the relationship

Let's run through the process in detail. As a developer, Jim must create a static identity relationship with four roles to correlate the different data representations. Table 2 displays his design.

Table 2. Relationship and role name
Name Value
Target namespace >http://www.ibm.com/rels/CustomerState 
Relationship name  Customer state 
Relationship role 1  ABBR 
Relationship role 2  JDBC
Relationship role 3  SAP 
Relationship role 4  SSA

Then he can begin to implement.

Creating the relationship and adding the roles

Figure 2 shows the first three steps:

  1. Create a relationship by selecting File > New > Relationship.
  2. Input namespace http://www.ibm.com/rels/CustomerState and name CustomerState as shown in Figure 2.
  3. Click Next.
    Figure 2. Create the relationship
    Create the relationship
  4. Select the Static relationship radio button and click Next as shown in Figure 3.
    Figure 3. Select relationship type
    Select relationship type
  5. Select the Identity relationship radio button and then click Finish as shown in Figure 4.
    Figure 4. Select identity relationship
    Select identity relationship
  6. Repeatedly select the Add Role icon to create four roles as shown in Figure 5.
    Figure 5. Add role
    Add role
  7. Input namespace http://www.ibm.com/rels/CustomerState and role names ABBR, JDBC, SAP and SSA as shown in Figure 6.
    Figure 6. Input namespace and role names
    Input namespace and role names

Populating the static relationship

Before developer Jim created the relationship, businesswoman Lisa captured the states' values in four systems into a spreadsheet table and delivered the table to Jim. Figure 7 shows the spreadsheet.

Figure 7. Instance data in spreadsheet
Instance data in spreadsheet

At first, Jim manually typed the data rows one by one into Integration Developer.

Manually add predefined data

Below are the steps to type data rows one by one (see Figure 8):

  1. Select the CustomerState icon from the relationship editor.
  2. Select Properties from the horizontal list of items below the roles.
  3. Select Instance Data from the vertical list of items below the Properties tab.
  4. Fill in the information using Table 2 as a reference.
  5. Select Add to add a second row of correlated data.
Figure 8. Populate the static relationship
Populate the static relationship

Jim soon got bored. There were too many data rows. After he found a relationship designer that supported .csv file importing in Process Server V7, he saved the spreadsheet file to CSV format. Figure 9 displays the .csv file in Notepad.

Figure 9. Instance data in .csv file
Instance data in .csv file

Importing the static relationship instance data

The import function makes it possible to import a large amount of relationship instance data. The steps are outlined below:

  1. Rearrange the data. Jim made some changes based on the .csv file he prepared. He removed the role title line and left only the real value, as Figure 10 shows.
    Figure 10. Rearrange data and remove the role title line
    Rearrange data and remove the role title line
  2. Click the Import button on the instance data editor as shown in Figure 11.
    Figure 11. Import the static relationship instance data
    Import the static relationship instance data
  3. Input or browse to select the prepared .csv file as shown in Figure 12.
  4. Click Next.
    Figure 12. Select the .csv file and import the static relationship instance data
    Select the .csv file and import the static relationship instance data
  5. As the default, no column is bound (Figure 13).
    Figure 13. Columns are not bound
    Columns are not bound
  6. Click each Not bound field in the first row and then choose the right role and key attribute name from the drop-down list as shown in Figure 14.
    Figure 14. Select the roles and key attributes
    Select the roles and key attributes
  7. Click Finish.
  8. Select Overwrite in the following dialog.
  9. Figure 15 shows that all instance data has been injected.
    Figure 15. Instance data injected
    Instance data injected

Exporting the static relationship instance data

In addition to the import function, an export function exports relationship instance data into a .csv file. Here are a few steps that explain how to use it (also see Figure 16):

  1. Click the Export button. You can also click File > Export > Business Integration > Relationship instance data to start the export dialog.
  2. Select the first Contains only instance values radio button to only back up instance values.
  3. Input or browse to set target file name.
  4. Click OK.
    Figure 16. Export the static relationship instance data
    Export the static relationship instance data

Putting the relationship into practice

After the task related to the relationship was completed, Jim focused on putting the relationship into the business.

The Interface Mediation (IFM) has been deprecated since Process Server V7.0, so Jim decided to make his business scenario based on the mediation flow. Table 3 outlines his decision table.

Table 3. Decision table
Task Before Process Server V7.0 After Process Server V7.0
Service integration  Interface Mediation (IFM)  Mediation flow
Data mapping  BO map  XML map
Data correlation  Relationship  Relationship

Completing the business scenario

Jim used the mediation flow to integrate services and XML Map to do the data mapping.

You can use a static relationship in the XML map. Figure 17 shows the abbr2jdbc XML map, which uses the relationship CustomerState to do the lookup.

Figure 17. abbr2jdbc XML map
abbr2jdbc XML map

Figure 18 shows the lookup properties.

So far, developer Jim finished all application design work in Integration Developer. The project interchange file is available to download at the end of this article.

Figure 18. Relationship lookup
Relationship lookup

Deploying the application on Process Server

After Jim delivered the application to administrator Ted, Ted deployed the application to the Process Server runtime.

During the application install, the relationship instance data defined in authoring time loads into the database.

Managing the relationship instance data during runtime

Access the relationship manager in the admin console via Integration Applications > Relationship Manager > Relationships.

You can use the relationship manager to create, delete, import, and export relationship instance data on the Process Server runtime.

Creating or deleting the relationship instance data manually

Follow the steps below to create a relationship instance data:

  1. Select the radio button next to the relationship name and then click Create.
  2. Click the Create button one at a time to create the role instance data (Figure 19).
    Figure 19. Create static relationship instance
    Create static relationship instance
  3. Click OK to save.

Follow these steps to delete the relationship instance data. Figure 20 illustrates the process.

  1. Select the radio button next to the relationship name.
  2. Click Query to get all instance data.
  3. Choose one item and then click Delete.
Figure 20. Delete the static relationship instance
Delete the static relationship instance

Exporting the relationship instance data from runtime

You can export the relationship instance data in two formats, .ri or .csv. You can open the .csv file with Microsoft Excel or OpenOffice Calc. You can copy the .ri file to Integration Developer and then edit from there. You can also import the .csv file to Integration Developer.

Follow these steps to export:

  1. Select the radio button next to the relationship name and click Export (Figure 21).
    Figure 21. Export static relationship instance
    Export static relationship instance
  2. Specify the format of the file saving data. Select the .csv radio button and click Export (Figure 22). The relationship instance data saves to a file called CustomerState.csv. By default, the file name is the same as the relationship name.
    Figure 22. Select the .csv file format and export the static relationship instance data
    Select the .csv file format and export the static relationship instance data

Importing the relationship instance data into runtime

Lisa found several typo mistakes she made when she collected the relationship data. She told Ted about the mistakes and wanted him to correct them. He exported the relationship instance data to file CustomerState.csv and delivered it to Lisa so that she could correct the mistakes herself. Lisa opened the file in Excel, corrected the mistakes, and then sent the file back to Ted.

Ted followed these steps to import CustomerState.csv:

  1. Go to the relationship manager to see a list of relationships. Click Integration Applications > Relationship Manager, and then click Relationships to list all relationships.
  2. Select the radio button next to the relationship name and click Import (Figure 23).
    Figure 23. Select the relationship to import the static relationship instance data
    Select the relationship to import the static relationship instance data
  3. Choose the file to import and click Import (Figure 24).
    Figure 24. Choose the file and import the data
    Choose the file and import the data

The importing function in the relationship manager supports only a full format .csv file, which includes metadata. That information is necessary for the program to locate the relationship and to match the data column to the relative role.

To get a fully formatted .csv file, you should use the Export feature in the relationship manager. Review the Exporting the relationship instance data from runtime section for details. Another way is to export through Integration Developer. See the Exporting the static relationship instance data section for step-by-step instructions.


Conlusion

In this article, through a business scenario, you learned how to create, delete, export, and import a large amount of static relationship instance data during both application development time and runtime.


Download

DescriptionNameSize
Project interchange fileCRM.zip22KB

Resources

Learn

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Business process management on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Business process management, WebSphere
ArticleID=551398
ArticleTitle=WebSphere Process Server relationship service: Efficiently manage static relationship instance data
publish-date=10202010