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
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.
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
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
|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:
- Create a relationship by selecting File > New > Relationship.
namespace http://www.ibm.com/rels/CustomerStateand name
CustomerStateas shown in Figure 2.
- Click Next.
Figure 2. Create the relationship
- Select the Static relationship radio button and click
Next as shown in Figure 3.
Figure 3. Select relationship type
- Select the Identity relationship radio button and
then click Finish as shown in Figure 4.
Figure 4. Select identity relationship
- Repeatedly select the Add Role icon to create four
roles as shown in Figure 5.
Figure 5. Add role
namespace http://www.ibm.com/rels/CustomerStateand role names
SSAas shown in Figure 6.
Figure 6. 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
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):
- Select the CustomerState icon from the relationship editor.
- Select Properties from the horizontal list of items below the roles.
- Select Instance Data from the vertical list of items below the Properties tab.
- Fill in the information using Table 2 as a reference.
- Select Add to add a second row of correlated data.
Figure 8. 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
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:
- 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
- Click the Import button on the instance data editor
as shown in Figure 11.
Figure 11. Import the static relationship instance data
- Input or browse to select the prepared .csv file as shown in Figure 12.
- Click Next.
Figure 12. Select the .csv file and import the static relationship instance data
- As the default, no column is bound (Figure 13).
Figure 13. Columns are not bound
- 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
- Click Finish.
- Select Overwrite in the following dialog.
- Figure 15 shows that all instance data has been injected.
Figure 15. 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):
- Click the Export button. You can also click File > Export > Business Integration > Relationship instance data to start the export dialog.
- Select the first Contains only instance values radio button to only back up instance values.
- Input or browse to set target file name.
- Click OK.
Figure 16. 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|
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
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
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:
- Select the radio button next to the relationship name and then click Create.
- Click the Create button one at a time to create the
role instance data (Figure 19).
Figure 19. Create static relationship instance
- Click OK to save.
Follow these steps to delete the relationship instance data. Figure 20 illustrates the process.
- Select the radio button next to the relationship name.
- Click Query to get all instance data.
- Choose one item and then click Delete.
Figure 20. 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:
- Select the radio button next to the relationship name and click
Export (Figure 21).
Figure 21. Export static relationship instance
- 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
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:
- Go to the relationship manager to see a list of relationships. Click Integration Applications > Relationship Manager, and then click Relationships to list all relationships.
- 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
- Choose the file to import and click Import (Figure
Figure 24. 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.
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.
|Project interchange file||CRM.zip||22KB|
- Developing integration solutions with WebSphere Process Server relationships
- Keeping your data in sync with WebSphere Process Server relationships
- Working with WebSphere Process Server relationship service APIs
- Static and dynamic relationships in WebSphere Process Server and WebSphere ESB V7
- developerWorks WebSphere application connectivity zone
Dig deeper into Business process management on developerWorks
Get samples, articles, product docs, and community resources to help build, deploy, and manage your cloud apps.
Experiment with new directions in software development.
Software development in the cloud. Register today to create a project.
Evaluate IBM software and solutions, and transform challenges into opportunities.