bea.com | products | dev2dev | support | askBEA

Download Docs | Site Map | Glossary
Search

B2B Samples

RosettaNet 2.0 Security Sample

The RosettaNet 2.0 Security sample shows how WebLogic Integration can be used to implement RosettaNet 2.0 PIP 3A2 and PIP 0A1 using workflows. Specifically, it shows two trading partners exchanging business messages that conform to the RosettaNet 2.0 PIP 3A2 standard.

This section includes the following topics:

- Introduction to the RosettaNet 2.0 Security Sample

- RosettaNet 2.0 Security Sample Overview

- Before Running the RosettaNet 2.0 Security Sample

- Running the RosettaNet 2.0 Security Sample

- Workflows Behind the RosettaNet 2.0 Security Sample

Introduction to the RosettaNet 2.0 Security Sample

RosettaNet is a non-profit consortium of companies that creates, implements, and promotes open e-business process standards. A RosettaNet Partner Interface Process (PIP) defines business processes between trading partners. PIP 3A2 provides an automated process that can be used by trading partners to request and provide product price and availability information.

The RosettaNet 2.0 Security sample demonstrates the implementation of PIP 3A2. It also implements PIP 0A1, which provides a mechanism for sending failure notifications. Finally, the sample demonstrates the WebLogic Integration security features required for RosettaNet 2.0 support: two-way SSL authentication, digital signatures, data encryption, and nonrepudiation.

For more information about implementing RosettaNet with WebLogic Integration, see Implementing RosettaNet for B2B Integration. For more information about using security with the B2B integration functionality of WebLogic Integration, see Implementing Security with B2B Integration.

RosettaNet publishes several documents that are helpful in understanding the RosettaNet 2.0 PIPs used in this sample. The following documents and zip files are available in the Standards section at the RosettaNet Web site (http://www.rosettanet.org):

- Understanding a PIP Blueprint—Explains how to read a PIP blueprint. Available under Supporting Documents in the Standards section.

- PIP 3A2 - Request Quote zip file—Contains PIP 3A2 specification information and DTDs. Available under Standards, PIPs, Cluster 3: Order Management, Segment 3A: Quote and Order Entry, PIP 3A2: Request Price and Availability, Version R1.3.

- PIP 0A1 - Notification of Failure zip file—Contains PIP 0A1 specification information and DTDs. Available under Standards, PIPs, Cluster 0: RosettaNet Support, Segment 0A: Administrative, PIP 0A1: Nofication of Failure, Version R1.3.

RosettaNet 2.0 Security Sample Overview

The following sequence provides a high-level overview of the communications between PIP 3A2 trading partners in this sample:

1. A customer trading partner sends a price and availability request to a supplier trading partner. Such a request might be sent, for example, by a computer manufacturer (customer trading partner) who wants to know whether a supplier can provide a certain quantity of memory chips at a particular price. The following figure shows the request being sent. The envelope in the following figure represents an XML message that contains the price and availability request.

2. The supplier sends the customer an acknowledgment that it has received the request for price and availability.

3. The supplier sends the customer a response containing the quantity and the price at which the supplier will sell the requested item.

4. The customer sends a receipt acknowledgment to the supplier, indicating that it has received the price and availability response.

Before Running the RosettaNet 2.0 Security Sample

Before running the RosettaNet 2.0 Security sample, complete the following steps:

1. Follow the instructions in Preparing to Run the Samples.

2. Make sure the proxy settings on your browser do not prevent you from connecting to the sample WebLogic Server. For more information, see "Web Browser Configuration Requirements" in WebLogic Integration Administration and Design Tools in Starting, Stopping, and Customizing BEA WebLogic Integration.

Running the RosettaNet 2.0 Security Sample

Several limitations have been identified for this sample. For information about them, including workarounds, see the descriptions of two Change Requests, CR063709 and CR075768, in "Known Limitations" in BEA WebLogic Integration Release Notes.

Unlike the other B2B samples provided with WebLogic Integration, the RosettaNet 2.0 Security sample does not run in the samples domain and is not started from the samples launcher page.

To run the RosettaNet 2.0 Security sample, complete the following steps:

1. Go to the WebLogic Integration home directory (the directory in which you installed WebLogic Integration) by entering the appropriate command, as shown in the following examples:

   - Windows:

   >     cd c:\bea\weblogic700\integration

   - UNIX:

   >     cd /home/me/bea/weblogic700/integration

2. To set the top-level WebLogic Integration environment variables, run the setenv script appropriate for your platform:

   - Windows:

   >     setEnv

   - UNIX:

   >     ./setenv.sh

3. Go to the RosettaNet 2.0 Security sample bin directory by entering the appropriate command for your platform:

   - Windows:

   >     cd %SAMPLES_HOME%\integration\samples\RN2Security\bin

   - UNIX:

   >     cd $SAMPLES_HOME/integration/samples/RN2Security/bin

4. Run the RunRN2Security script with the pointbase option.

   >     RunRN2Security pointbase

   Wait until both instances of WebLogic Server finish booting before starting the next step. (The RunRN2Security script starts two instances of WebLogic Server as background processes.) When the servers finish booting, the following log message is displayed in your WebLogic Server console window:

   >     RunRN2Security execution successful

   Warning: Unlike the other B2B samples, the RosettaNet 2.0 Security sample does not support the use of the WebLogic Integration Database Wizard to switch the database to be used with the samples domain.

5. Start a browser. Load the QPASubmit JSP page by entering the following URL:

   >     http://localhost:7501/QPASubmit.jsp

   The QPA (RosettaNet 2.0 PIP 3A2) Submission page is displayed.

6. Select a Global Product ID, a Product Unit Price, and a Product Quantity. Click Send QPA.

   The following information about the status of the submission and responses to it are displayed in the browser.

7. If you want to complete the steps described in A Peek at the Workflows at this time, keep both instances of WebLogic Server running.

   If you do not want to complete the steps described in A Peek at the Workflows at this time, exit your browser and shut down both instances of WebLogic Server by completing the following procedure:

   >     StopRN2Security

Workflows Behind the RosettaNet 2.0 Security Sample

The RosettaNet 2.0 Security sample shows how WebLogic Integration can be used to implement RosettaNet 2.0 PIP 3A2 and PIP 0A1 using workflows. A public process is part of a formal contract between trading partners that specifies the content and semantics of the messages they exchange. The public process between the two public workflows (PIP3A2_Customer_RN2 and PIP3A2_Supplier_ RN2) is the WebLogic Integration implementation of the PIP 3A2 standard. A private process is specific to a particular business organization and is not visible outside that organization. The public workflows that implement PIP 3A2 are represented by the shaded rectangles in Figure 4-1. The private process is represented by the unshaded rectangles in Figure 4-1.

The following figure shows different interactions between various RosettaNet security sample workflows.

Figure 4-1 Interactions Among RosettaNet 2.0 Security Workflows

Note: The flow of logic shown in the figure illustrates only the sequence of workflows that is executed if no errors occur. This sequence does not contain any error-handling logic. For example, PIP 0A1, the workflow for issuing failure notifications, is not shown.

Before the flow of execution can start, two instances of WebLogic Server must be booted. (One instance for the customer and the other for the supplier.) The flow of execution for this sample starts at the Browser square in the upper left corner of Figure 4-1. The following steps trace a portion of the flow of execution:

1. To start the flow of execution, the user launches a browser and loads the QPASubmit.jsp page.

2. The user then enters values on the JSP page and selects Submit.

3. The selection of Submit triggers an XML document to be sent as a WebLogic Integration XML event.

4. This event, in turn, triggers the Customer_PrivateWF workflow.

5. The first item in the Customer_PrivateWF workflow is executed.

6. As a result, the first action in the PIP3A2_Cusotmer_RN2 workflow (Send Business Message with price and availability request) is executed.

To trace the remainder of the execution flow, see Figure 4-1.

A Peek at the Workflows

To peruse the sample private and public workflows, complete the following steps:

1. Go to the WebLogic Integration home directory (the directory in which you installed WebLogic Integration) by entering the command appropriate for your platform, as shown in the following examples:

   - Windows:

   >     cd c:\bea\weblogic700\integration

   - UNIX:

   >     cd /home/me/bea/weblogic700/integration

2. To set the top-level WebLogic Integration environment variables, run the setenv script appropriate for your platform:

   - Windows:

   >     setenv

   - UNIX:

   >     ./setenv.sh

3. Complete this step only if you have not booted two instances of WebLogic Server by running the RunRN2Security script as described in Running the RosettaNet 2.0 Security Sample. Boot two instances of WebLogic Server by performing the procedure appropriate for your platform and database, as shown in the following examples:

   - Windows:

   >     cd %SAMPLES_HOME%\integration\samples\RN2Security\bin
   >     RunRN2Security pointbase

   - UNIX:

   >     cd $SAMPLES_HOME/integration/samples/RN2Security/bin
   >     RunRN2Security pointbase

   Wait until both instances of WebLogic Server finishes booting before starting the next step. When the servers finish booting, the following log message is displayed in your WebLogic Server console window.

   >     RunRN2Security execution successful

4. Start the WebLogic Integration Studio by performing the procedure appropriate for your platform:

   - Windows:

   Choose Start—>Programs—>BEA WebLogic Platform 7.0—>WebLogic Integration 7.0—>Studio.

   - UNIX:

   cd $WLI_HOME/bin
   studio

5. Log in to the WebLogic Integration Studio using the following information:

   - Login: joe

   - Password: password

   - URL: t3//localhost:7501

   The main WebLogic Integration Studio window is displayed.

6. Expand the drop-down list under Organization (in the left pane) and select ORG1.

7. Expand the Templates folder in the left pane. A list of all the templates for the sample is displayed.

8. Expand the Customer_PrivateWF folder in the left pane.

9. Complete the following steps to open and view an instance of the Customer_PrivateWF workflow:

   1. Right-click the folder, named with a date and time, in the Customer_PrivateWF folder. A menu is displayed.

   2. Select Open.

   The start, task, decision, and event nodes that make up the Customer_PrivateWF workflow are displayed.

10. Double-click the Start the Public Workflow task. The Task Properties window is displayed.

11. Select the Activated tab.

    The actions that make up the Start the Public Workflow task are displayed.

12. Double-click Set workflow variable "PIPInput" XML structure to display the Set Workflow Variable window. This window shows how the PIPInput XML workflow variable is composed. (In this sample, PIPInput has been composed already; these steps show how to view it.) PIPInput is a mandatory WebLogic Integration RosettaNet Input workflow variable. It must be set in the private workflow before the public workflow is invoked. The format of this variable is XML that conforms to the RosettaNet PIP DTD for the PIP message being implemented. In this sample, the XML must conform to the 3A2PriceAndAvailabilityQueryMessageGuidline.dtd. This DTD, supplied by RosettaNet, defines the content of the first message that the Customer trading partner passes to the Supplier trading partner. (See step 1 in the RosettaNet 2.0 Security Sample Overview.)

    In this sample, the private Customer_PrivateWF workflow sets the contents of the PIPInput workflow variable and calls the PIP3A2_Customer_RN2 workflow. The PIP3A2_Customer_RN2 workflow uses the contents of the PIPInput variable to construct an XML business message. This message is sent to the PIP3A2_Supplier_RN2 workflow when the Send Business Message Action is invoked. For a complete list of RosettaNet Template variables, see "RosettaNet Template Variables" in Using Workflows with RosettaNet in Implementing RosettaNet for B2B Integration.

13. Expand the following nested nodes in the XML tree:

    - Pip3A2PriceAndAvailabilityQuery

    - ProductPriceAndAvailabiltyQuery

    - ProductPriceAndAvailability

    - ProductLineItem

    The values of two important nodes are set in the right pane:

    - The GlobalPartnerRoleClassificationCode XML node is set to the string Customer.

    - The ProductQuanity node is set to the value of the ProductQuantity workflow variable. The product quantity (the number of items requested by the customer) is set on the QPASubmit JSP page and passed to the workflow through the ProductQuantity workflow variable.

    Note: This procedure is just one way of populating the PIPInput variable. The PIPInput variable can also be populated by reading in values from a file or by passing in the entire contents of an XML document.

14. Click Cancel in the Set Workflow Variable window.

15. In the Task Properties window, double-click Start Public Workflow on the Activated tab.

    The Start Public Workflow window is displayed.

    In this window, parameters are defined for the Start the Public Workflow action as follows:

    - Conversation Name is set to 3A2.

    - Conversation Version is set to 1.3.

    - Role in Conversation is set to Customer.

    In addition, two TP (trading partner) Names, RNBuyer and RNSeller, are specified in the Parties field. WebLogic Integration uses the conversation name, conversation version, conversation role, and the trading partners specified as parties to locate the appropriate collaboration agreement to use for an action.

    For the preceding action, WebLogic Integration searches the active collaboration agreements in the repository for a collaboration agreement between two trading partners named RNBuyer and RNSeller that specifies a conversation named 3A2, a conversation version of 1.3, with the role of customer. The following excerpt from the rn2_peer1_sec.xml file defines the collaboration agreement that fits the criteria for the preceding Start Public Workflow action.

Listing 4-1 Collaboration Agreement in the Import Repository Data File

>     <collaboration-agreement
>     	name="RN2|9.9|RosettaNet2|100"
>     	global-identifier="RN2|9.9|RosettaNet2|RNBuyer|RNSeller|102"
>     	version="1.0"
>     	status="ENABLED"
>     	conversation-definition-name="3A2"
>     	conversation-definition-version="1.3">
>     	<party
>     		trading-partner-name="RNBuyer"
>     		party-identifier-name="RNBuyerPID"
>     		delivery-channel-name="RNBuyerChannel"
>     		role-name="Customer"/>
>     	<party
>     		trading-partner-name="RNSeller"
>     		party-identifier-name="RNSellerPID"
>     		delivery-channel-name="RNSellerChannel"
>     		role-name="Product Supplier"/>
>     </collaboration-agreement>

The collaboration agreement defines the name and version of the conversation definition to be used between the specified parties. The collaboration agreement in Listing 4-1 specifies use of the conversation definition name of 3A2 and the conversation definition version of 1.3 between the RNBuyer trading partner in the role of Customer and the RNSeller trading partner in the role of Product Supplier.

Using the name and version of the conversation definition, as well as the assigned roles, WebLogic Integration can determine which workflow template to start. The conversation definition in Listing 4-2 specifies that for conversations named 3A2, with a version number of 1.3, and with a trading partner in the customer role, an instance of the PIP3A2_Customer_RN2 workflow template will be started.

Listing 4-2 Conversation Definition in the Import Repository Data File

>         <conversation-definition
>             name="3A2"
>             version="1.3"
>             business-protocol-name="RosettaNet"
>             protocol-version="2.0">
>             <role
>                 name="Customer"
>                 wlpi-template="PIP3A2_Customer_RN2">
>                 <process-implementation wlpi-org="ORG1"/>
>             </role>
>             <role
>                 name="Product Supplier"
>                 wlpi-template="PIP3A2_Supplier_RN2">
>                 <process-implementation wlpi-org="ORG1"/>
>             </role>
>         </conversation-definition>

Thus, in this sample, the Start Public Workflow action triggers the PIP3A2_Customer_RN2 workflow.

The conversation name and version number defined in the Start Public Workflow are the PIP name and version defined by RosettaNet for PIP 3A2. These parameters, along with values specified for the roles and trading partners, correspond to the conversation name, conversation version, role, and trading partners that are registered in the repository.

1. Select the Workflow tab.

   The template variables to be passed to and received from the public PIP workflow are defined on the Workflow tab:

   - The template variables passed to the public PIP workflow are listed under Parameters.

   - The template variables returned by the public PIP workflow are listed under Results.

   In this sample, the template variable fromDUNS is set by the Customer_PrivateWF in the Start Public Workflow action. It is passed to the PIP3A2_Customer_RN2 workflow when the PIP3A2_Customer_RN2 is invoked by the Customer_PrivateWF workflow. Some template variables for RosettaNet 2.0 are mandatory; others are optional.

   The fromDUNS variable, which defines the DUNS number of the sender, is mandatory. (A DUNS number is a unique nine-digit identifier assigned to a business entity by Dun & Bradstreet.) The DUNS number specified in the fromDUNS variable must match the business ID defined in the repository for that trading partner. For a complete list of RosettaNet template variables, see "RosettaNet Template Variables" in Using Workflows with RosettaNet in Implementing RosettaNet for B2B Integration.

   PIPOutput is a mandatory template variable that contains the service content of the received message. It is set by the PIP3A2_Customer_RN2 workflow and is passed to the Customer_PrivateWF workflow when the PIP3A2_Customer_RN2 workflow returns control back to the workflow that called it: Customer_PrivateWF.

2. Click Cancel in the Start Public Workflow window.

3. Click Cancel in the Task Properties window.

4. In the left pane of the main Studio window, expand the PIP3A2_Customer_RN2 folder. (The PIP3A2_Customer_RN2 workflow is called from the Customer_PrivateWF workflow.)

5. To view the properties of the PIP3A2_Customer_RN2 workflow, right-click the folder, named with a date and time, in the PIP3A2_Customer_RN2 folder. A menu is displayed. Select Properties.

6. The Template Definition PIP3A2_Customer_RN2 dialog box is displayed.

7. Select the B2B Integration tab.

   The Conversation tab (nested on the B2B Integration tab) is displayed.

   The data entered on this tab specifies that the PIP3A2_Customer_RN2 workflow should be started if a Start Public Workflow action is invoked with the specified conversation and role.

   The conversation name, version, and role defined in this window:

   - Match the PIP name, version, and role defined by RosettaNet for PIP 3A2.

   - Correspond to the conversation name, version, and role that are registered in the repository.

8. Click OK.

9. Close the Workflow Design Customer_PrivateWF window. Click the X in the top right corner of the Workflow Design window.

10. Complete the following steps to open and view a PIP3A2_Customer_RN2 workflow instance:

    1. Right-click the folder, named with a date and time, in the PIP3A2_Customer_RN2 folder. A menu is displayed.

    2. Select Open.

    The start, task, decision, and event nodes that make up the PIP3A2_Customer_RN2 workflow are displayed.

    The Start node is the first task that is executed in this workflow.

11. Double-click the Send Message task. The Task Properties window is displayed.

12. Select the Activated tab.

    The actions that make up the Send Message task are listed on the Activated tab.

13. In the left pane of the Task Properties window, double-click the Send Business Message action. This action sends an XML business message, which is based on the contents of the PIPInput XML workflow variable. (This variable was defined earlier in the private Customer_PrivateWF workflow.)

    Note: This step corresponds to step 1 in RosettaNet 2.0 Security Sample Overview.

14. Exit the WebLogic Integration Studio: From the Studio menu bar, choose File—>Exit.