Setting up the sample

Setting up the sample involves setting up WebSphere Partner Gateway, WebSphere Admin Console, and WebSphere Process Server. As explained in the section Topology used by the sample, system A is running WebSphere Process Server, System B is running WebSphere Partner Gateway for buyer, and system C is running WebSphere Partner Gateway for seller. Messages in the sample flow in the following manner:

The following sections describe how to do this.

Setting up WebSphere Partner Gateway

The following procedure describes how to set up WebSphere Partner Gateway so that it has the settings and resources it needs to run the scenarios of the PIP sample. The following steps describe the setup for both System B and System C.

  1. Start WebSphere Partner Gateway and log in to the Community Console as Hub Admin.
  2. Create a Community Manager profile to represent WebSphere Partner Gateway and a Community Participant profile for the other system, as follows: For information on creating profiles, see the Administrator Guide.
  3. Create the gateways for the profiles.

    See the Administrator Guide for more information on creating gateways.

    1. Click Account Admin > Profiles > Community Participant.
    2. Search for the Community Manager profile you created.
    3. Select the profile and click Gateways.
    4. Click Create.
    5. Create two gateways on each side, one or events and the other for request or response messages.
    6. In the Gateway Detail section, type or select the values shown in Table 2:
      Table 2. Community Manager gateway values
      Parameter Value to type or select

      Gateway Name

      Type the name for the gateway, as follows:

      System B:
      PIP message: PIP3A4BuyerGW
      Event messages: EventGW

      System C:
      PIP message: PIP3A4SellerGW
      Event messages: EventGW

      Transport

      JMS

      Target URI

      iiop://<System_A_IP_addresss:2089>/

      If you have installed WebSphere Partner Gateway using the embedded WebSphere option, you must specify the target URI as follows:

      File:///<user_defined_MQ_JNDI_bindings_path>

      For more information, refer to the Enterprise Integration Guide.

      JMS Factory Name

      Type the name of the JMS factory, as follows:

      System B: PIP3ABuyer/PIP3A4BuyerQCF
      System C: PIP3A4Seller/PIP3ASellerQCF

      JMS Queue Name

      Type the name of the JMS queue, as follows:

      System B:
      PIP messages: ResponseQ/PIP3A4BuyerGW
      Event messages: EventFromBCG/PIP3A4BuyerGW

      System C:
      PIP messages: ResponseQ/PIP3A4SellerGW
      Event messages: EventFromBCG/PIP3A4SellerGW

      JMS JNDI Factory Name

      com.ibm.websphere.naming.WsnInitialContextFactory

      If you have installed WebSphere Partner Gateway using embedded WebSphere option, please refer to the Enterprise Integration Guide.

      JMS Message Class

      TextMessage

      Note:
      Refer to the Enterprise Integration Guide for more information on back-end configuration using JMS transport protocol through WPM.
    7. For other parameters, use the default values.
    8. Click Save.
    9. Create the gateway for the community participant in the same way but use the following values for the Gateway Detail section:
      Table 3. Community participant gateway values
      Parameter Value to type or select
      Gateway name Type any name for the gateway
      Transport HTTP/1.1
      Target URI

      Type the URL for the other WebSphere Partner Gateway system, as follows:

      System B: http://<IP_Address_of_System_C:57080>/bcgreceiver/submit/test
      System C: http://<IP_Address_of_System_B:57080>/bcgreceiver/submit/test

      For the other parameters, use the default values.

    10. Click Save.
  4. Set the gateways as default gateways:
    1. Click Account Admin > Profiles > Community Participant.
    2. Search for the Community Manager profile you created.
    3. Select the profile and click Gateways.
    4. In the Gateway List section, click View Default Gateways.
    5. For all of the gateway types, select the gateway you created.
    6. Set the default gateways for the Community Participant profile in the same way.
  5. Upload the following PIP document flow packages:

    Refer to the "Uploading packages" section in the Administrator Guide for information on uploading packages. If packages for the other RNIF version or another version of the PIP have already been loaded, set the Overwrite Data parameter to Yes.

    You can verify that the packages have been uploaded by clicking Hub Admin > Hub Configuration > Document Flow Definition. Click All and look for the following in the RNIF (V02.00) and Backend Integration packages:

  6. Create interactions for the PIPs:
    1. Click Hub Admin > Hub Configuration > Document Flow Definition.
    2. In the Manage Document Flow Definitions window, click Manage Interactions.
    3. In the Manage Interactions screen, click Create Interaction.
    4. Expand the Document Flow Definition trees by clicking All in the Source tree and in the Target tree.
    5. In the Source tree, select the radio button for Action: Purchase Order Request Action in the following context:
      Package: RNIF (V02.00) 
          Protocol: RosettaNet (V02.00)
              Document Flow: 3A4 (V02.02) "Request Purchase Order" 
                  Activity: Request Purchase Order
    6. In the target tree, select the radio button for Action: Purchase Order Request Action in the following context:
      Package: Backend Integration (1.0) 
          Protocol: RNSC (1.0)
              Document Flow: 3A4 (V02.02) "Request Purchase Order" 
                  Activity: Request Purchase Order
    7. In the Action field, select Bi-directional Translation of RosettaNet and RosettaNet Service Content with Validation.
    8. Click Save.
    9. Repeat steps a-h to create an interaction in the other direction. That is, the RNIF Package is the target and the Backend Integration package is the source.
    10. Repeat steps a-i to create interactions for the following actions:
      • 3A4 Purchase Order Confirmation Action.
      • 0A1 Failure Notification Action
  7. Create an interaction for XMLEvent.
    1. Click Hub Admin > Hub Configuration > Document Flow Definition.
    2. In the Manage Document Flow Definitions window, click Manage Interactions.
    3. In the Manage Interactions window, click Create Interaction.
    4. Expand the Document Flow Definition trees by clicking All in the Source tree and in the Target tree.
    5. In the Source tree, select the radio button for Document Flow: XMLEvent (1.0) in the following context:
      Package: Backend Integration (1.0) 
          Protocol: XMLEvent (1.0)
    6. In the Target tree, select the radio button for Document Flow: XMLEvent (1.0) in the following context:
      Package: Backend Integration (1.0) 
          Protocol: XMLEvent (1.0)
    7. In the Action field, select Pass Through.
    8. Click Save.
  8. Create an interaction for XMLEvent to 0A1 RNSC.
    1. Click Hub Admin > Hub Configuration > Document Flow Definition.
    2. In the Manage Document Flow Definitions window, click Manage Interactions.
    3. In the Valid Document Flow Interactions window, click Create Interaction.
    4. Expand the Document Flow Definition trees by clicking All in the Source tree and in the Target tree.
    5. In the Source tree, select the radio button for Document Flow: XMLEvent (1.0) in the following context:
      Package: Backend Integration (1.0) 
          Protocol: XMLEvent (1.0)       
    6. In the target tree, select the radio button for Action: Failure Notification Action in the following context:
      Package: Backend Integration (1.0) 
          Protocol: RNSC (1.0)
             Document Flow: 0A1 (V02.00) "Notification of Failure"
                Activity: Distribute Notification of Failure
    7. In the Action field, select Bi-directional Translation of RosettaNet and xml with validation.
    8. Click Save.
  9. Create targets for the transport protocols:
    1. Click Hub Admin > Hub configuration > Targets.
    2. Click Create.
    3. In the Target Name field, type a name.
    4. In the Transport field, select HTTP/S.
    5. In the Target Configuration section, type the URI for the Receiver that handles HTTP messages such as /bcgreceiver/Receiver.
    6. Select the appropriate Gateway Type. (Example: Production).
    7. Click Save.
    8. Click Hub Admin > Hub configuration > Targets.
    9. Click Create.
    10. Create two targets on each side, one for PIP messages and another for event messages.
    11. In the Target Name field, type a name.
    12. In the Transport field, select JMS.
    13. In the Target Configuration section, type the appropriate values for the following fields:
      • JMS Provider URL: iiop://<System_A_IP_address:2089>/

        If you have installed WebSphere Partner Gateway using the embedded WebSphere option, you must specify the JMS Provider URL as follows:

        File:///<user_defined_MQ_JNDI_bindings_path> For more information, refer to the Enterprise Integration Guide.
      • JMS Queue Name:
        System B:
        Pip messages: RequestQ/PIP3A4Buyer
        Event messages: EventToBCG/PIP3A4Buyer
        System C:
        Pip messages: RequestQ/PIP3A4Seller
        Event messages: EventToBCG/PIP3A4Seller
      • JMS Factory Name:
        System B: PIP3A4Buyer/PIP3A4BuyerQCF
        System C: PIP3A4Seller/PIP3A4SellerQCF
      • JNDI Factory Name: com.ibm.websphere.naming.WsnInitialContextFactory
      Note:
      Refer to the Enterprise Integration Guide for more information on back-end configuration using JMS transport protocol through WPM.
    14. Select the appropriate Gateway Type. Example: Production
    15. Click Save.
  10. Refer to the Administrator Guide for information on enabling security.
  11. Enable the B2B capabilities for the profiles.
    1. Click Account Admin > Profiles > Community Participant.
    2. Search for the Community Manager profile you created.
    3. Select the profile and click B2B Capabilities.
    4. Expand the Document Flow Definition tree by clicking All.
    5. Ensure that the Community Manager has the B2B capabilities for the RNIF (V02.00) and Backend Integration (1.0) packages enabled. If the packages are inactive (neither enabled or disabled), activate them by clicking the icon in the Set Source and Set Target columns.
    6. Repeat the previous step for the RosettaNet (V02.00) protocol under the RNIF (V02.00) package and the XMLEvent (1.0) and RNSC (1.0) protocols under the Backend Integration (1.0) package. Do the same for the following Document Flows:
      • Document Flow: XMLEvent (1.0) under Protocol: XMLEvent (1.0)
      • Document Flow: 3A4 (V02.02) under Protocol: RNSC (1.0)
      • Document Flow: 0A1 (V02.00) under Protocol: RNSC (1.0)
      • Document Flow: 3A4 (V02.02) under Protocol: RosettaNet (V02.00)
      • Document Flow: 0A1 (V02.00) under Protocol: RosettaNet (V02.00)
    7. Repeat a-f for the Community Participant profile.
  12. Create participant connections.
    1. Click Account Admin > Participant Connections.
    2. In the Source, select the Community Manager profile.
    3. In the Target, select the Community Participant profile.
    4. Click Search.
    5. Click the Activate button for the following interaction:
      Table 4.
      Source Target

      Package: Backend Integration (1.0)

      Protocol: XMLEvent (1.0)

      Document Flow: XMLEvent (1.0)

      Package: Backend Integration (1.0)

      Protocol: RNSC (1.0)

      Document Flow: 0A1 (V02.00)

      Activity: Distribute Notification of Failure (N/A)

    6. After step d, click the Activate button for all the other interactions you see on the screen.
    7. In the Source, select the Community Participant profile.
    8. In the Target, select the Community Manager profile.
    9. Click Search.
    10. Click the Activate for the following interaction:
      Table 5.
      Source Target

      Package: Backend Integration (1.0)

      Protocol: XMLEvent (1.0)

      Document Flow: XMLEvent (1.0)

      Package: Backend Integration (1.0)

      Protocol: XMLEvent (1.0)

      Document Flow: XMLEvent (1.0)

    11. After step d, click the Activate button for all the other interactions you seen on the screen.
    12. Select EventGW of community manager for all XML Event and PIP0A1 interactions.

Setting up WebSphere Application Server Admin Console

The following procedure describes how to create JMS resources required on System A to run all the scenarios of the PIP sample.

  1. Log on to WebSphere Application Server Admin Console for System A.
  2. Create the following System integration buses: For more information on creating system integration buses, refer to the Enterprise Integration Guide.
  3. Create the following queues:

    The following queues are required on PIP3A4Buyer service integration bus:

    Table 6. Required queues on PIP3A4Buyer service integration bus
    Queue name JNDI name
    RequestQ RequestQ/PIP3A4Buyer
    ResponseQ ResponseQ/PIP3A4BuyerGW
    EventForBCG EventFromBCG/PIP3A4BuyerGW
    EventToBCG EventToBCG/PIP3A4Buyer

    The following queues are required on PIP3A4Seller service integration bus:

    Table 7. Required queues on PIP3A4Seller service integration bus
    Queue name JNDI name
    RequestQ RequestQ/PIP3A4Seller
    ResponseQ ResponseQ/PIP3A4SellerGW
    EventForBCG EventFromBCG/PIP3A4SellerGW
    EventToBCG EventToBCG/PIP3A4Seller
    For more information on creating queue destinations on system integration buses, refer to the Enterprise Integration Guide.
  4. Deploy the generated .ear files.

    For information on generating .ear files, refer Generating .ear files for PIP processes.

    For information on deploying generated .ear files, refer to the WebSphere Application Server documentation.
  5. Create two databases with embedded cloudscape with the names PIP3A4Buyer and PIP3A4Seller. For each of the databases, following these steps:
    1. Using Windows Explorer, navigate to the following directory:<Websphere process server installed directory>\runtimes\bi_v6\cloudscape\bin\embedded>
    2. Execute cview.bat.
    3. Create two databases with the names PIP3A4Buyer and PIP3A4Seller.
    4. Create the PROCStatus table with the following structure in each of the databases. The buyer process uses the PROCStatus table in PIP3A4Buyer database, and the seller process uses PROCStatus table in PIP3A4Seller database.
      Table 8. Structure for PROCStatus table
      Column Type Description
      PIPINSTANCEID VARCHAR(80) PIP instance identifier. Uniquely identifies a PIP process.
      REQDOCID VARCHAR(80) Requesting document identifier
      PROCNAME VARCHAR(20) Name of the process
      STATUS VARCHAR(10) It can take two values: START: if given process instance is still running. STOP: if given process instance is not running.
    5. Close the cloudscape databases.
      Important:
      If you forget to close the databases, your business processes will not be able to access the databases.
    6. Configure the JDBC provider information using the WAS admin console, as follows:
      1. Select resources > jdbc provider.
      2. Click the cloudscape jdbc provider (xa).
      3. If one does not exist, create it.
      4. Add datasource to this provider.
      5. Make sure the JNDI names are jdbc/PIP3A4Buyer for the buyer database and jdbc/PIP3A4Seller for the seller database.

Generating .ear files for PIP processes

The following procedure describes how to set up WebSphere Process Server so that it has the settings and resources it needs to run all the scenarios of the PIP sample.

  1. Open WebSphere Integration Developer, and provide a new name for Workspace, for example: PIP3A4.
  2. Right-click "Business integration explorer," and select Import from the menu.
  3. Select Project Interchange from the Wizard SELECT page.
  4. Provide the BCG_PIP3A4Sample.zip file location in the "From zip file text" field.
  5. Click the Select All and Finish buttons.
  6. Clean your project by selecting Project > Clean project. Ensure that the "Start a build immediatly" option is selected.
  7. Export PIP3A4Buyer as BCG_PIP3A4BuyerApp.ear and PIP3A4Seller as BCG_PIP3A4SellerApp.ear, then close WebSphere Integration Developer.
  8. Start the WebSphere Process Server, and deploy the .ear files using the WebSphere Application Server Admin Console.
  9. Start the following applications: PIP3A4BuyerApp and PIP3A4SellerApp.

Note:
At the time of cleaning and building your project, you may get the following error in the default.xsd file. Ignore this type of error:
The element may not have duplicate name and target namespace.

Running Scenario 1

The following steps describe how to run Scenario 1.

  1. Send PIP3A4 purchase order request to Buyer Process. The following steps describe how to do this
    1. Open a Web browser, and go to the following URL: http://<System_A_IP_address>:9080/PIP3A4BuyerWeb/index.jsp.
    2. Locate the BCG_3A4PurchaseOrderRequest_V02.02.xml message by clicking the Browse button, then click the "Create Business Object" button.
    3. Send the business object in asynchronous mode by clicking the Send Request button. The PIP3A4BuyerBPEL process is invoked with the business object sent from the index.jsp.
  2. Open the Systemout.log file (located in <WPS installation>\profiles\ProcSrv01\logs\server1), then search for the following text:

    *** Buyer Side ::Received Request with doc id($$$$$)from Backend ***

    *** Buyer Side ::Assigned Received Request with doc id($$$$$)to outbound port ***

    *** Buyer Side ::Sent Request with doc id($$$$$) to Trading partner ***
    Important:
    The symbol $$$$$ refers to the dynamic values that are being sent from or received by the partner.
    This text indicates that the 3A4 request has been successfully posted to the JMS JNDI queue (RequestQ/PIP3A4Buyer).
  3. Use the Document Viewer of the Console to verify that the WebSphere Partner Gateway instance on the buyer's side has received the 3A4 request and sent it to the WebSphere Partner Gateway instance configured as the seller's gateway. Do this for both System B and System C. The following steps describe how to do this:
    1. Open your favorite browser.
    2. Type the URL of the console in the Address text field.
      System B: http://<Address of System B>:<WebSphere Partner Gateway console port of System B>/console
      System C: http://<Address of System C>:<WebSphere Partner Gateway console port of System C>/console
    3. Enter the user name, password and Company Login Name
    4. Click the "Viewers" tab.
    5. Click the "Document viewer" tab.
    6. Click Search. The display shows all the documents that are sent or received by the system.
    7. To get details about the documents received and sent from System C, follow steps 3a through 3f replacing System B with System C.
  4. The seller's WebSphere Partner Gateway instance (System C) receives the 3A4 Request RNIF message and converts it to a RNSC message. It then sends the message (3A4 Request RNSC as backend integration packaging message over JMS) to the seller process (PIP3A4SellerBPEL) running on WebSphere Process Server (System A). The sellers' WebSphere Partner Gateway instance on System C also sends RNIF acknowledgement to the buyers's WebSphere Partner Gateway instance on System B.
  5. The buyer's WebSphere Partner Gateway instance (System B) receives this RNIF acknowledgment from the seller's WebSphere Partner Gateway instance on System C. It then converts it to an XML event with status code 100, and sends this XML event (as backend integration packaging message over JMS) to the buyer's Event Dispatcher(BuyerEventDispatcher) running on WebSphere Process Server (System A).
  6. Send PIP 3A4 purchase order confirmation to Seller Process. The following steps describe how to do this:
    1. Open another instance of your browser, and go to the following URL: http://<System_A_IP_address>:9080/PIP3A4SellerWeb/index.jsp.
    2. Locate the BCG_3A4PurchaseOrderConfirmation_V02.02.xml message by clicking the Browse button.
    3. Click the Create Business Object button.
    4. Provide the Requesting document identifier and x-aux-process-instance-id values, as follows:
      1. Provide the value of the Requesting Document Identifier in the RequestingDocumentIdentifier text field. This value is the same as the value of the x-aux-system-msg-id header of the received request message. You can obtain this value from the index.jsp file of the buyer.
      2. Provide the value of the process instance identifier value in the x-aux-process-instance-id text field. This value is the same as the value of the x-aux-process-instance-id header of the received request message. You can obtain this value from the index.jsp file of the seller.
  7. Send the business object in asynchronous mode by clicking the Send Request button. The PIP3A4SellerBPEL process is invoked with the business object sent from the index.jsp.
  8. The PIP3A4SellerBPEL receives a 3A4 purchase order confirmation message. It then sends this message to the JMS queue configured in WebSphere Partner Gateway (System C) JMS gateway. To verify 3 that the A4 purchase order confirmation message was successful sent, open the Systemout.log file (located in <WPS installation>\profiles\ProcSrv01\logs\server1) in a text editor, and search for the following text:

    *** Seller Process :: Confirmation with DocId($$$$$)Received from Backend for the request with DocID($$$$$) ***

    *** Seller Process :: Received Confirmation with DocID($$$$$) assigned to outbound port for the request with DocId($$$$$) ***

    *** Seller Process :: Confirmation with DocID($$$$$) Sent to Trading partner for the request with DocId($$$$$) ***

    Important:
    The symbol $$$$$ refers to the dynamic values that are being sent from or received by the partner.

    The seller's WebSphere Partner Gateway (System C) receives a 3A4 confirmation message. It then sends the 3A4 confirmation RNIF message to the buyer's WebSphere Partner Gateway (System B). The buyer's WebSphere Partner Gateway (System B) receives the RNIF message and converts it to RNSC. It then sends a 3A4 RNSC (as backend integration packaging message over JMS) to the JMS queue configured in WebSphere Partner Gateway (System B) JMS gateway.

  9. The BuyerBPELProcess receives the 3A4 confirmation message from the JMS queue. This is the 3A4 confirmation at the buyer's backend process. To verify that the BuyerBPELProcess received the 3A4 confirmation message, open the Systemout.log file (located in <WPS installation>\profiles\ProcSrv01\logs\server1) in a text editor, and search for the following text:

    *** Buyer Side ::Received Confirmation from Trading partner ***

Running Scenario 2

The following steps describe how to run Scenario 2.

  1. Select the Initiated request ID from the drop-down list from the Scenario 2 section at the buyer side.
  2. Send the event by clicking the Send Event button.
  3. Open the Systemout.log file (located in <WPS installation>\profiles\ProcSrv01\logs\server1) in a text editor, then search for the following text:

    ###############################################

    Associated Process for the Event having PIPInstanceID ==> $$$$$ is not active

    ###############################################

    Important:
    The symbol $$$$$ refers to the dynamic values that are being sent from or received by the partner.

    This indicates that the XML Event has been successfully posted to the EventToBCG/PIP3A4Seller queue.

  4. The buyer's WebSphere Partner Gateway instance receives the event message. The instance sends a PIP 0A1 message to the seller's gateway.
  5. The seller's WEbSphere Partner Gateway instance receives the PIP 0A1 message and converts it into a PIP 0A1 RNSC message. The seller's WebSphere Partner Gateway instance sends this 0A1 RNSC message to the backend.
  6. The SellerEventDispatcher receives the PIP 0A1 RNSC message. This is the cancellation event at the seller's backend process.
  7. Open the Systemout.log file (located in <WPS installation>\profiles\ProcSrv01\logs\server1) in a text editor, and search for the following text:

    ###############################################

    Associated Process for the PIP0A1 having failed PIPInstanceID ==> $$$$ is not active

    ###############################################

    Important:
    The symbol $$$$$ refers to the dynamic values that are being sent from or received by the partner.

Copyright IBM Corp. 2003, 2005