bea.com | products | dev2dev | support | askBEA

Download Docs | Site Map | Glossary
Search

B2B Samples

Channel Master Sample (Deprecated)

The Channel Master sample shows how a large trading partner uses WebLogic Integration to automate its supply chain. The sample demonstrates both point-to-point and multicast (broadcast) communications using the XOCP business protocol between WebLogic Integration trading partners.

This section includes the following topics:

- Channel Master Sample Overview

- Before Running the Channel Master Sample

- Running the Channel Master Sample

- Workflows Behind the Channel Master Sample

Note: The Channel Master sample is based on the XOCP protocol, which is deprecated as of this release of WebLogic Integration. For information about the features that are replacing XOCP, see BEA WebLogic Integration Release Notes.

Channel Master Sample Overview

The following sequence summarizes the communication between the trading partners for this sample:

1. One trading partner, the channel master buyer, broadcasts a query for pricing and availability (QPA) of a particular item. In this sample, two supplier trading partners are listening for queries, so two supplier trading partners receive the query. (A broadcast communication can be received by many trading partners. In this sample only two suppliers are listening, so only two receive the query.) This action demonstrates broadcast or multicast communication. In the following figure, the envelopes labeled QPA represent XML messages.

   In this case, an XML message containing a query for pricing and availability (QPA) is passed from one trading partner to another. This illustration is a simple representation of trading partners. For a more detailed representation, see Multicast or Broadcast Messages.

2. The two suppliers send the buyer reply quotes, each of which contains the price and availability of the requested item. In this step, the two suppliers have point-to-point communications with the buyer.

3. The buyer selects a supplier and sends a purchase order (PO) to that supplier. This action provides another example of point-to-point communication.

4. The supplier replies with a purchase order acknowledgment message.

Before Running the Channel Master Sample

Before running the Channel Master 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 Channel Master Sample

To run the Channel Master sample, complete the following steps:

Note: If the instance of WebLogic Server started by the RunSamples script is running, skip to step 4.

1. Go to WLI_HOME (the directory in which you installed WebLogic Integration):

   >     cd WLI_HOME

   - Windows example:

   If you installed WebLogic Platform in the c:\bea directory, WLI_HOME represents the following pathname: c:\bea\weblogic700\integration.

   - UNIX example:

   If you installed WebLogic Platform in the /home/me/bea directory, WLI_HOME represents the following pathname: /home/me/bea/weblogic700/integration.

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

   - On Windows:

   >     setEnv

   - On UNIX:

   >     . setenv.sh

3. Start the RunSamples script by completing the procedure appropriate for your platform:

   - Windows:

   Choose Start—>Programs—>BEA WebLogic Platform 7.0—>WebLogic Integration 7.0—>Integration Examples—>Start Server and Launch Examples (with dataloader).

   - UNIX:

   a) Make sure your PATH environment variable includes the directory in which the Netscape executable (netscape) resides.

   b) Run the RunSamples script:

   >     cd $SAMPLES_HOME/integration/config/samples
   >     RunSamples

   Warning: For UNIX systems, the directory in which the netscape executable resides must be included in your PATH environment variable. If it is not included, the samples launcher page is not displayed when the RunSamples script is run. You can start the samples launcher page by starting the Netscape browser on the same machine on which the RunSamples script is currently running, and entering the following URL:
   http://localhost:7001/index.html

4. If the RunSamples script detects that the configuration section of the RunSamples script has been run before, the following prompt is displayed:

   >     The WebLogic Integration repository has already been created
   >     and populated, possibly from a previous run of this
   >     RunSamples script. Do you want to destroy all the current
   >     data in the repository and create and populate the
   >     WebLogic Integration repository, again?
   >     Y for Yes, N for No

   If you answer N to this question, the RunSamples script skips the steps for creating and populating the repository and runs only the step for booting the sample instance of the WebLogic Server.

   If you answer Y to this question, the RunSamples script recreates and repopulates the repository, and then it boots the sample instance of the WebLogic Server. When you answer Y the RunSamples script destroys all the data currently in the repository and loads an unaltered version of the sample data into the repository. Answer Y only when the current sample data has been altered or removed and you want a fresh or unaltered version of the sample data in the repository.

   Now the RunSamples script starts an instance of WebLogic Server (as a background process) and the samples launcher page is displayed.

   Unlike most of the WebLogic Integration B2B samples, the Channel Master sample is not started from the samples launcher page. It does, however, require the sample instance of WebLogic Server to be running. Until you complete this procedure, make sure that this instance of WebLogic Server and the browser with the sample launcher page continue to run.

5. Start the WebLogic Integration Worklist by completing the procedure appropriate for your platform:

   - Windows:

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

   - UNIX:

   a) Go to $WLI_HOME (the directory in which you installed WebLogic Integration):

   >     cd $WLI_HOME/bin

   b) Start the worklist script:

   >     worklist

6. Log in to the WebLogic Integration Worklist using the following information:

   - Login: joe

   - Password: password

   - URL: t3//localhost:7001

   The main WebLogic Integration Worklist window is displayed.

7. Run the sample using the WebLogic Integration Worklist.

Note: The Worklist client application is deprecated as of this release of WebLogic Integration. For information about the features that are replacing the Worklist, see the BEA WebLogic Integration Release Notes.

1. Expand the drop-down list in the upper-right corner of the Worklist window. Select ORG1.

2. Select the joe tab.

3. From the Worklist menu bar, choose Workflow—>Start a Workflow. The Start Workflow dialog box is displayed.

4. Select the BuyerPrivate workflow. Click OK.

5. To verify that the sample has run successfully, look for the following message in the myserver.log file:

   CHANNEL MASTER SAMPLE RAN SUCCESSFULLY!!!

   The myserver.log file is located in the %SAMPLES_HOME%\integration\config\samples\logs directory on a Windows platform and in the $SAMPLES_HOME/integration/config/samples/logs directory on a UNIX platform.

1. Exit the WebLogic Integration Worklist: From the Worklist menu bar, choose File—>Exit.

2. If you want to run more B2B samples or complete the steps described in Viewing the SupplierOnePrivate Workflow at this time, keep the samples launcher page open and keep the instance of WebLogic Server running.

   If you do not want to run more B2B samples or complete the steps described in Viewing the SupplierOnePrivate Workflow at this time, exit from your browser and shut down the instance of WebLogic Server by completing the procedure appropriate for your platform:

   - Windows:

   cd %SAMPLES_HOME%\integration\config\samples
   stopWebLogic

   - UNIX:

   cd $SAMPLES_HOME/integration/config/samples
   stopWebLogic

Workflows Behind the Channel Master Sample

The following figure shows the high-level interactions between the different Channel Master workflows.

Figure 3-1 Interactions Among Channel Master Workflows

The following figure is the first of several that trace the execution flow of the Channel Master sample.

Figure 3-2 Tracing the Workflows: Steps 1-4

The following sequence provides details about each of the steps indicated by a corresponding number in Figure 3-2:

1. The user invokes the WebLogic Integration Worklist utility, which starts the BuyerPrivate workflow.

2. The BuyerPrivate workflow creates the QPA request XML document and stores it in a workflow variable.

3. The BuyerPrivate workflow starts the CMBuyerQPAPublic workflow.

4. The CMBuyerQPAPublic workflow broadcasts a QPA business message based on the QPA request document to all the suppliers. This broadcast causes two instances of the CMSupplierQPAPublic workflows to start: one for the PartnerSupplierOne trading partner and one for the PartnerSupplierTwo trading partner.

   Two CMSupplierQPAPublic workflow instances are started because each trading partner has a collaboration agreement with the ChannelMasterHub trading partner that specifies the following: when a workflow receives a business message with the conversation definition name of CMQPAConversation and the conversation definition of 1.1, it must use the role name of CMSupplier.

   The following listing shows the collaboration agreement between the ChannelMasterHub and the PartnerSupplierOne trading partner. (For more information about why the ChannelMasterHub trading partner is necessary, see Multicast or Broadcast Messages.)

Listing 3-1 Collaboration Agreement Section of Import Repository Data File

>     <collaboration-agreement
>     	name="CMQPAConversation|1.1|PartnerSupplierOne|ChannelMasterHub"
>     	global-identifier="CMQPAConversation|1.1|PartnerSupplierOne|ChannelMasterHub"
>     	version="1.1"
>     	status="ENABLED"
>     	conversation-definition-name="CMQPAConversation"
>     	conversation-definition-version="1.1">
>     	<party
>     		trading-partner-name="PartnerSupplierOne"
>     		party-identifier-name="PartnerSupplierOnePartyId"
>     		delivery-channel-name="PartnerSupplierOneDeliveryChannel"
>     		role-name="CMSupplier"/>
>     	<party
>     		trading-partner-name="ChannelMasterHub"
>     	party-identifier-name="ChannelMasterHubPartyId"
>     		delivery-channel-name="ChannelMasterHubDeliveryChannel"
>     		role-name="CMBuyer"/>
>     </collaboration-agreement>

This listing is an excerpt from the BulkLoaderData.xml file for the Channel Master sample. This file is used to import the data needed for the sample into the WebLogic Integration repository. It is located in the %SAMPLES_HOME%\integration\samples\ChannelMaster\lib directory on a Windows system and in $SAMPLES_HOME/integration/ChannelMaster/lib on a UNIX system. Repository data can also be entered via the WebLogic Integration B2B Console.

A similar collaboration agreement for the PartnerSupplierTwo trading partner, in the import repository data file, specifies the following: when a workflow receives a business message with the conversation definition name of CMQPAConversation and the conversation definition of 1.1, it must use the role name of CMSupplier.

The conversation definition for CMQPAConverstion specifies that for the CMSupplier role, an instance of the CMSupplierQPAPublic workflow should be started, as shown in the following listing.

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

>     <conversation-definition
>     	name="CMQPAConversation"
>     	version="1.1"
>     	business-protocol-name="XOCP"
>     	protocol-version="1.1">
>     	<role
>     		name="CMBuyer"
>     		wlpi-template="CMBuyerQPAPublic">
>     		<process-implementation wlpi-org="ORG1" />
>     	</role>
>     	<role
>     		name="CMSupplier"
>     		wlpi-template="CMSupplierQPAPublic">
>     		<process-implementation wlpi-org="ORG1" />
>     	</role>
>     </conversation-definition>

The following figure shows the execution flow for steps 5-7. Each step is described in text after the figure.

Figure 3-3 Tracing the Workflows: Steps 5-7

1. Each instance of the CMBuyerQPAPublic workflow posts an internal XML event. When the CMSupplierQPAPublic workflow instance for PartnerSupplierOne posts an internal XML event, this event triggers the SupplierOnePrivate workflow to start. When the CMSupplierQPAPublic workflow instance for PartnerSupplierTwo posts an internal XML event, this event triggers the SupplierTwoPrivate workflow to start.

   The PartnerSupplierOne trading partner triggers only the SupplierOnePrivate workflow. It does not trigger the SupplierTwoPrivate workflow because the start node for the SupplierOnePrivate workflow specifies that the workflow should start only if the triggering event comes from PartnerSupplierOne. For detailed directions on opening the SupplierOnePrivate workflow and viewing the conditions in which the SupplierOnePrivate workflow can be started, see Viewing the SupplierOnePrivate Workflow.

2. Both the SupplierOnePrivate and SupplierTwo Private workflows extract variable information from the QPA request, create QPA XML replies, and then post QPA XML reply messages as internal XML events.

3. Each instance of the CMSupplierQPAPublic workflow waits for a QPA XML reply message. Once a reply message is received, the CMSupplierQPAPublic workflow constructs a business message from the QPA XML reply message and sends it.

   The following figure shows the execution flow for steps 8-16. Each step is described in text after the figure.

   Figure 3-4 Tracing the Workflows: Steps 8-16

4. The CMBuyerQPAPublic workflow sends an aggregate QPA XML reply message. The message contains price and availability information from each supplier.

5. The BuyerPrivate workflow that was waiting for the QPA XML reply begins execution again and chooses a supplier based on the QPA XML reply message.

6. The BuyerPrivate workflow creates a purchase order XML document and stores it in the POXml XML workflow variable.

7. The BuyerPrivate workflow starts the CMBuyerPOPublic workflow.

8. The CMBuyerPOPublic workflow creates and sends the purchase order business message. Then it waits for the purchase order acknowledgment receipt.

9. The CMSupplierPOPublic workflow extracts the purchase order information from the passed-in POMessage workflow variable, constructs the POXml XML workflow variable, posts the XML event, and then waits for the purchase order acknowledgment. PartnerSupplierTwo offers the best price and availability, so it is chosen as the supplier.

10. The SupplierTwo Private workflow extracts the variable information from the PO request, creates a PO XML reply, and then posts the PO XML reply message as an internal XML event.

11. The CMSupplierPOPublic workflow waits for a purchase order acknowledgment. Once such an acknowledgment is received, the CMSupplierPOPublic workflow sends an XML acknowledgment message back to the CMBuyerPOPublic workflow.

12. The CMBuyerPOPublic workflow waits for a purchase order acknowledgment. Once such an acknowledgment is received, the CMBuyerPOPublic workflow extracts information from the incoming XML document and then posts the purchase order XML acknowledgment document.

13. The BuyerPrivate workflow ends. (This step is not shown in Figure 3-4.)

Viewing the SupplierOnePrivate Workflow

The SupplierOnePrivate workflow accepts XML events only from the PartnerSupplierOne trading partner. To view the SupplierOnePrivate workflow and to see how the workflow limits the XML events it accepts, complete the following steps:

Note: If the instance of WebLogic Server started by the RunSamples script is running, skip to step 4.

1. Go to WLI_HOME (the directory in which you installed WebLogic Integration):

   >     cd WLI_HOME

   - Windows example:

   If you installed WebLogic Platform in the c:\bea directory, WLI_HOME represents the following pathname: c:\bea\weblogic700\integration.

   - UNIX example:

   If you installed WebLogic Platform in the /home/me/bea directory, WLI_HOME represents the following pathname: /home/me/bea/weblogic700/integration.

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

   - On Windows:

   >     setEnv

   - On UNIX:

   >     . setenv.sh

3. Start the RunSamples script by completing the procedure appropriate for your platform:

   - Windows:

   Choose Start—>Programs—>BEA WebLogic Platform 7.0—>WebLogic Integration 7.0—>Integration Examples—>Start Server and Launch Examples (with dataloader).

   - UNIX:

   a) Make sure your PATH environment variable includes the directory in which the Netscape executable (netscape) resides.

   b) Run the RunSamples script:

   >     cd $SAMPLES_HOME/integration/config/samples
   >     RunSamples

Warning: For UNIX systems, the directory in which the netscape executable resides must be included in your PATH environment variable. If it is not included, the samples launcher page is not displayed when the RunSamples script is run. You can start the samples launcher page by starting the Netscape browser on the same machine on which the RunSamples script is currently running, and entering the following URL:
http://localhost:7001/index.html

1. If the RunSamples script detects that the configuration section of the RunSamples script has been run before, the following prompt is displayed:

   >     The WebLogic Integration repository has already been created
   >     and populated, possibly from a previous run of this
   >     RunSamples script. Do you want to destroy all the current
   >     data in the repository and create and populate the
   >     WebLogic Integration repository, again?
   >     Y for Yes, N for No

   If you answer N to this question, the RunSamples script skips the steps for creating and populating the repository and runs only the step for booting the sample instance of the WebLogic Server.

   If you answer Y to this question, the RunSamples script recreates and repopulates the repository, and then it boots the sample instance of the WebLogic Server. When you answer Y, the RunSamples script destroys all the data currently in the repository and loads an unaltered version of the sample data into the repository. Answer Y only when the current sample data has been altered or removed and you want a fresh or unaltered version of the sample data in the repository.

   Now the RunSamples script starts an instance of WebLogic Server as a background process and the samples launcher page is displayed.

2. Start the WebLogic Integration Studio by completing 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

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

   - Login: joe

   - Password: password

   - URL: t3//localhost:7001

   The main WebLogic Integration Studio window is displayed.

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

5. Expand the Templates folder in the left pane. A list of all the templates for the samples are displayed.

6. Expand the SupplierOnePrivate folder in the left pane.

7. Complete the following steps to open and view an instance of the SupplierOnePrivate workflow:

   1. Right-click the folder, named with a date, that is listed under the SupplierOnePrivate.

   2. Select Open.

      A graphical depiction of the workflow is displayed. It shows the start, task, decision, and event nodes that make up the SupplierOnePrivate workflow.

8. Double-click the Start node in the top left corner of the right pane.

   The Start Properties dialog box is displayed.

   Before this workflow can be started, the expression defined in the Condition field of the preceding Start Properties dialog box must be equal to true.

9. Double-click the A+B option to the right of the Condition Field. The Expression Builder dialog box is displayed.

   The specified expression evaluates the XML message received by the workflow to determine whether the value of the CMQPARequest TPName node is PartnerSupplierOne. If it is, the expression is true and the workflow is started.

10. If you want to continue running B2B samples or complete the steps in Viewing the SupplierOnePrivate Workflow, keep the samples launcher page open and the sample instance of WebLogic Server running.

    If you do not want to continue running B2B samples, shut down the sample instance of WebLogic Server and exit from the browser in which you are running the samples launcher page. To shut down the WebLogic Server, complete the procedure appropriate for your platform:

    - Windows:

    cd %SAMPLES_HOME%\integration\config\samples
    stopWebLogic

    - UNIX:

    cd $SAMPLES_HOME/integration/config/samples
    stopWebLogic

Multicast or Broadcast Messages

Multicasting, or broadcasting of messages is supported only for the XOCP business protocol and only when messages are routed through a routing proxy delivery channel (hub). It is not supported for direct point-to-point communication. Consequently, the PartnerBuyer trading partner in the sample does not send a message directly to the PartnerSupplierOne and PartnerSupplierTwo trading partners. Instead, it sends the messages through the ChannelMasterHub trading partner via the routing proxy delivery channel. The following figure shows how multicast messages are routed among trading partners.

Caution: For simplicity, all the trading partners in this sample use the same WebLogic Server instance. In a production environment, the buyer and each supplier trading partner runs a separate WebLogic Server instance.