Broadcasting Master Index Updates to External Systems

Defining the Client Connection to the JMS Topic Using BPEL

You can use a BPEL process or other JMS client (such as a Java client, JMS Binding Component, or message driven bean) to subscribe to the messages that the master index application sends to the JMS Topic. The BPEL process or JMS client can then forward the messages to the appropriate external systems. The instructions provided here describe how to send the messages to a flat file in XML format using a BPEL process. In a production environment, the File binding type would likely be replaced by HTTP or SOAP.

Creating the BPEL Project for the Master Index Topic

The BPEL project contains the BPEL process and web service definitions that define how to process the messages published by the master index Topic.

ProcedureTo Create the BPEL Project

  1. Complete the procedure described in Creating a JMS Connection Factory.

  2. In the NetBeans toolbar, click New Project.

    The New Project Wizard appears.

  3. In the Categories box, select CAPS > ESB.

  4. In the Projects box, select BPEL Module, and then click Next.

  5. Enter the name and location of the new project, and then click Finish.

  6. Continue to Creating a Web Service Definition for the JMS Binding Component.

Creating a Web Service Definition for the JMS Binding Component

A JMS BC provides the connection between the JMS Topic and the BPEL process. The web service definition configures this connection.

ProcedureTo Create the JMS Web Service Definition

  1. Complete the procedure described in Creating the BPEL Project for the Master Index Topic.

  2. Right-click the new BPEL project, point to New, and then select WSDL Document.

    The New WSDL Document Wizard appears.

  3. In the upper portion of the window, enter a file name and folder name for the WSDL file.

  4. In the lower portion of the window, do the following:

    1. Select Concrete WSDL Document.

    2. In the Binding Field, select JMS.

    3. In the Type field, select Receive.

  5. Click Next.

    The Request Connection Configuration window appears.

  6. In the JMS Connection section, enter the following information:

    • Connection URL – The URL to connect to the message server. The format of the URL is mq://host_name:port. The default port is 7676.

    • User Name – The user name to log on to the message server. The default user name is admin.

    • Password – The password to log on to the message server. The default password is admin.

  7. (Optional) Configure the Payload Processing section according to your requirements.

  8. Click Next.

    The Request Consumer Configuration window appears.

  9. Configure the Destination Properties as follows:

    1. For the Destination property, enter Application_NameTopic, where Application_Name is the name of the master index application.

    2. For the Destination Type, select Topic.

    3. For Subscription Durability, select Non-durable.

    4. Select XA Transaction if you are using XA transactions.

  10. In the JMS Consumer Properties, you can leave the default or empty values.

  11. Click Next.

    The Advanced Configuration window appears.

  12. You can enter any of the advanced options listed at the bottom of this window, or click Finish if you do not need advanced options.

    The contents of the WSDL file appears in the editor after you click Finish.

Creating a Web Service Definition for the File Binding Component

For testing purposes, you can publish the master index broadcasts to a file using the File BC as described below. In a production environment, it is more likely that a SOAP or HTTP binding type would be used.

ProcedureTo Create the File Web Service Definition

  1. Complete the procedure described in Creating a Web Service Definition for the JMS Binding Component.

  2. Right-click the BPEL project, point to New, and then select WSDL Document.

    The New WSDL Document Wizard appears.

  3. In the upper portion of the window, enter a file name and folder for the WSDL file.

  4. In the lower portion of the window, do the following:

    1. Select Concrete WSDL Document.

    2. In the Binding Field, select File.

    3. In the Type field, select Write.

  5. Click Next.

    The Request Configuration window appears.

  6. In the File Write section, enter the following information:

    • File Name – The name of the file that output data will be written to.

    • Path – The absolute path to the directory where you want to store the output file.

  7. (Optional) Configure the Payload Processing section according to your requirements.

  8. Click Finish.

    The contents of the WSDL file appears in the editor.

  9. Continue to Creating a BPEL Process to Access the Master Index Topic.

Creating a BPEL Process to Access the Master Index Topic

The BPEL process defines the flow of data from the JMS Topic to the external systems that share data with the master index application using the web service definitions you created earlier. The BPEL process created below uses a File binding type. Your process might differ from this based on the binding type you use.

Perform the following steps to create and configure the BPEL process:

ProcedureTo Create the BPEL Process

  1. Complete the procedure described in Creating a Web Service Definition for the File Binding Component.

  2. In the Projects window, right-click the BPEL project, point to New, and then select BPEL Process.

    The New BPEL Process Wizard appears.

  3. Enter a file name and location for the BPEL Process, and then click Finish.

    The business process appears in the Business Process Editor.

  4. Continue to To Create Partner Links.

ProcedureTo Create Partner Links

  1. Create a new Partner Link for the JMS web service definition by doing the following:

    1. In the BPEL Designer Palette, click Partner Link and drag it to the drop point on the left.

      The Create New Partner Link window appears.

    2. Fill in the information for the Partner Link.

      • Enter a unique name for the Partner Link.

      • For the WSDL file, select the JMS Binding Component WSDL file you created in Creating a Web Service Definition for the JMS Binding Component.

      • Select the option button next to Use Existing Partner Link Type.

      • Accept the default values for the Partner Link Type, My Role, and Partner Role fields.

    3. Click OK.

  2. Create a new Partner Link for the File web service definition by doing the following:

    1. In the BPEL Designer Palette, click Partner Link and drag it to the drop point on the right.

      The Create New Partner Link window appears.

    2. Fill in the information for the Partner Link.

      • Enter a unique name for the Partner Link.

      • For the WSDL file, select the File Binding Component WSDL file you created in Creating a Web Service Definition for the File Binding Component.

      • Select the option button next to Use Existing Partner Link Type.

      • Accept the default value for the Partner Link Type, My Roles, and Partner Role fields.

    3. Click OK.

  3. Continue to To Create a Receive Activity.

ProcedureTo Create a Receive Activity

  1. From the BPEL Designer Palette, drag a Receive activity to the drop point.

  2. Click the Edit icon above the new Receive activity.

  3. Enter a name for the activity.

  4. In the Partner Link field, select the JMS Partner Link you created earlier.

  5. In the Operation field, select the JMS subscriber operation.

  6. Next to the Input Variable field, select Create.

    The New Input Variable dialog box appears.

  7. Enter a name for the variable and select the current BPEL process as the Scope.

  8. Click OK on both dialog boxes.

  9. Continue to To Create an Invoke Activity.

ProcedureTo Create an Invoke Activity

  1. From the BPEL Designer Palette, drag an Invoke activity to the drop point beneath the Receive activity just created.

  2. Click the Edit icon above the new Invoke activity.

  3. Enter a name for the activity.

  4. In the Partner Link field, select the File Partner Link you created earlier.

  5. In the Operation field, select the File operation.

  6. Next to the Input Variable field, select Create.

    The New Input Variable dialog box appears.

  7. Enter a name for the variable and select the current BPEL process as the Scope.

  8. Click OK on both dialog boxes.

  9. Continue to To Create an Assign Activity.

ProcedureTo Create an Assign Activity

  1. From the BPEL Designer Palette, drag an Assign activity to the drop point between the Receive and Invoke activities.


    Tip –

    The Assign activity is listed under Basic Activities in the Palette.


  2. Double-click the Assign activity.

    The BPEL Mapper appears.

  3. Map the input value from the Receive activity's variable to the Invoke activity's variable.

  4. Save and close the BPEL Process.

  5. Continue to Creating a Composite Application for Master Index Broadcasts.