![]() |
![]() |
|
|
Channel Master Sample
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
The following sequence summarizes the communication between the trading partners for this sample:
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.
Before Running the Channel Master Sample
Before running the Channel Master sample, complete the following steps:
Running the Channel Master Sample
To run the Channel Master sample, complete the following steps:
Note: If the instance of the WebLogic Server started by the RunSamples script is running, skip to step 3.
Choose Start
a) Make sure your PATH environment variable includes the directory in which the Netscape executable (netscape) resides.
b) Go to the WebLogic Integration home directory (the directory in which you installed WebLogic Integration). For example:
cd /home/me/bea/wlintegration2.1
c) Run the setenv script to set the top-level WebLogic Integration environment variables:
. setenv.sh
d) Run the RunSamples script:
cd samples/bin
RunSamples
Note: 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 cannot be 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 the 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 the 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.
The main WebLogic Integration Worklist window is displayed.
CHANNEL MASTER SAMPLE RAN SUCCESSFULLY!!!
The myserver.log file is located in the %WLI_HOME%\config\samples\logs directory on a Windows platform and in the $WLI_HOME/config/samples/logs directory on a UNIX platform.
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 WebLogic Server by completing the procedure appropriate for your platform:
Choose Start
cd $WLI_HOME/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:
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 %WLI_HOME%\samples\ChannelMaster\lib directory on a Windows system and in $WLI_HOME/samples/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
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.
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
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 the WebLogic Server started by the RunSamples script is running, skip to step 3.
Choose Start
a) Make sure your PATH environment variable includes the directory in which the Netscape executable (netscape) resides.
b) Go to the WebLogic Integration home directory (the directory in which you installed WebLogic Integration). For example:
cd /home/me/bea/wlintegration2.1
c) Run the setenv script to set the top-level WebLogic Integration environment variables:
. setenv.sh
d) Run the RunSamples script:
cd samples/bin
RunSamples
Note: 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 cannot be 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 the WebLogic Server as a background process and the samples launcher page is displayed.
Choose Start
cd $WLINT_HOME/bin
studio
The main WebLogic Integration Studio window is displayed.
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.
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.
If you do not want to continue running B2B samples, shut down the sample instance of the 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:
Choose Start
cd $WLI_HOME/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.
![]() |
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|