Home > Articles

Like this article? We recommend

Like this article? We recommend

Sample B2B Collaborative Prototype

This section describes how you can implement a B2B relationship using ebXML. Throughout this paper, we have discussed the requirements of B2B systems and we have described how Web services technologies can advance the development of these solutions over the Internet. In addition, a detailed review of the Web services technologies and architectures has been presented. This section puts these technologies into practice and describes the construction of a prototype that leverages Web services technologies. The prototype is based on an actual implementation at a large automotive dealer and was built using a combination of tools from Sun Microsystems and Sybase.

FIGURE 6 depicts the flow of events in the ebXML Sun ONE Application Server B2B collaboration prototype. A description of this graphic, starting from the top, follows.

Figure xxxFIGURE 6 ebXML Prototype Implementation Flow Chart

  • Model process. This prototype used a graphical UML modeling tool from Together Soft, though other UML modeling tools can work, too.

  • Create BPSS and CPA ebXML documents. Power-Designer from Sybase was used in this prototype to create the BPSS and CPA ebXML documents.

    • Create BPSS. The graphical modeling tool automatically generates the BPSS document, which is stored in a shared ebXML Registry.

    • Create CPA. Accomplished with a form-based UI, this document is stored in a shared ebXML Registry.

  • Get documents. BPSS and CPA are obtained from the shared ebXML Registry using a graphical UI client.

  • Negotiate CPP. In this iteration of the prototype, we assumed trading partner templates would define how to trade with the sample partners. Partners who wanted to interact with other partners would have to support the CPA as mandated. The document should be stored in a shared ebXML Registry.

  • Configure MSH. This task typically entails the installation of BPSS and CPA documents into the particular MSH implementation being used by the trading partners.

  • Initiate trading process. Accomplished at the BBB Auto Sales side (see FIGURE 7 on page 27), using a simple JSP-technology based form. In a real situation, it could be triggered by the trading partner's back-office systems.

  • Transact over BPSS and MSH. This involves sending and receiving ebXML messages (and related payloads) according to BPSS and CPA specifications.

  • Execute Web services. Various Web services are invoked automatically to illustrate how back-end fulfillment can be accomplished.

  • Issue requests. Simple forms created using JSP technology are used to review transaction results (such as Available Vehicle Response to a query) and initiate the next part of the business process on the BBB side. The prototype does this to better demonstrate the trading process. In a real-world implementation, many of these requests would be issued automatically by the trading partner's back-end systems.

  • Monitor transactions. ebXML transactions are monitored in real time during the prototype.

Creating a Trading Partner Agreement

The CPA is responsible for defining and tying together all of the messaging details required between two parties. The goal for this scenario is to create a bulk buying collaboration. While in some scenarios, a CPP is used to describe the partner's capabilities, this scenario used a template. Unlike two ad hoc trading partners who need CPPs to arbitrate how they can do business together, in this Sun ONE Application Server B2B collaboration prototype, a template CPA was created that mandated how trading partners would conduct business.

The bulk buying business activity contains a number of different business transactions, such as Check Vehicle Availability, Dealer Location, Vehicle History, and so on. The transactions are carried out using XML DTDs, because the STAR BODs were not available during the design of this project.

Figure 7FIGURE 7 Trading Partner Agreement—CPA

Note that the code snippet included here represents a small portion of the CPA. It is intended to convey a glimpse of what the XML structure for the CPA specification is and the core concepts around how a CPA defines the parameters in a trading partner agreement. The snippet contains time-outs, reliability, and security tag samples.

<!-- BTA Name = "Available Vehicle Activity" -->
    <tp:CanReceive>
     <tp:ThisPartyActionBinding tp:id="action_A01" 
tp:action="Available Vehicle Activity" tp:packageId="N0402">
      <tp:BusinessTransactionCharacteristics 
tp:isNonRepudiationRequired="false" 
      tp:isNonRepudiationReceiptRequired="false" 
tp:isSecureTransportRequired="false" 
      tp:isConfidential="none" tp:isAuthenticated="none" 
tp:isTamperProof="none" 
      tp:isAuthorizationRequired="false" 
tp:timeToAcknowledgeAcceptance="P2D" 
      tp:timeToAcknowledgeReceipt="P2D"/>
            
       <tp:ActionContext tp:binaryCollaboration="Bulk Buying" 
       tp:businessTransactionActivity="Available Vehicle Activity" 
       tp:requestOrResponseAction="VehiclesAvailableRequest"/>
       <tp:ChannelId>N04</tp:ChannelId>
     </tp:ThisPartyActionBinding>
     <tp:OtherPartyActionBinding>action_B01</tp:OtherPartyActionBinding>
     <tp:CanSend>
       <tp:ThisPartyActionBinding tp:id="action_A02" 
tp:action="Available Vehicle Activity" tp:packageId="N0402">
       <tp:BusinessTransactionCharacteristics 
tp:isNonRepudiationRequired="false" 
       tp:isNonRepudiationReceiptRequired="false" 
tp:isSecureTransportRequired="false" 
       tp:isConfidential="none" tp:isAuthenticated="none" 
tp:isTamperProof="none" 
       tp:isAuthorizationRequired="false" 
tp:timeToAcknowledgeAcceptance="P2D" 
       tp:timeToAcknowledgeReceipt="P2D"/>
      <tp:ActionContext tp:binaryCollaboration="Bulk Buying" 
tp:businessTransactionActivity="Available Vehicle Activity" 
tp:requestOrResponseAction="VehiclesAvailableRespond"/>
      <tp:ChannelId>N04</tp:ChannelId>
      <tp:OtherPartyActionBinding>action_B02</tp:OtherPartyActionBinding>
       </tp:CanSend>

Creating the BPSS

PowerDesigner from Sybase was used to graphically lay out and define business activity, and to map concepts together. PowerDesigner and similar tools enable developers to create libraries of activities that can be used to execute different scenarios. Each of these objects is reusable—after an object has been developed, it can be used in other scenarios or services, shortening future development projects. After the process has been defined, the tool programs the BPSS engine to execute the expected choreography.

Figure 7 is a logical description of the BPSS document responsible for implementing business process choreography in this RI. The state diagram describes the flow of the ebXML business transactions that are mapped to back-end Web services. B2B collaboration is composed of several business transactions, and the resulting sequence is captured in a BPSS.

To implement this scenario, an ebXML BPSS document is built describing the business process choreography between the deployed Web services. This BPSS is referenced from the template CPA. Messages are exchanged using the Sybase New Era's MSH implementation. Documents are stored and retrieved from the open source ebXML Registry implementation, and the business process choreography is navigated through the New Era Networks process engine.

Figure 8FIGURE 8 BPSS Choreography

Note that the code snippet included here is intended to convey the core concepts around creating a BPSS document. It includes state transition representation, time-outs, and error handling.

<BinaryCollaboration name="Bulk Buying">
   <InitiatingRole name="BulkUsedCarBuyers">
   </InitiatingRole>
   <RespondingRole name="General Motors">
   </RespondingRole>

// Define the TransactionActivity

   <BusinessTransactionActivity name="VehiclePurchase Approval Activity"
     businessTransaction="VehiclePurchaseApproval"
     fromAuthorizedRole="General Motors"
     toAuthorizedRole="BulkUsedCarBuyers">
   </BusinessTransactionActivity>
   <BusinessTransactionActivity name="Dealer Location Activity"
     businessTransaction="Dealer Location"
     fromAuthorizedRole="BulkUsedCarBuyers"
     toAuthorizedRole="General Motors">
   </BusinessTransactionActivity> 

...
//Build the Error Handling 
   <Start toBusinessState="Available Vehicle Activity"/>
   <Success fromBusinessState="VehiclePurchase Approval Activity"
        conditionGuard="Success">
   </Success>
   <Failure fromBusinessState="VehiclePurchase Approval Activity"
        conditionGuard="BusinessFailure">
   </Failure> 

//Build the state Transitions
  <Transition fromBusinessState="Available Vehicle Activity"
         toBusinessState="Dealer Location Activity"
         conditionGuard="Success">
   </Transition>
   <Transition fromBusinessState="Dealer Location Activity"
         toBusinessState="Vehicle History Activity"
         conditionGuard="Success">
   </Transition>
// Build into the BPSS a way to define the messages and timeouts

  <BusinessTransaction name="Vehicle History">
   <RequestingBusinessActivity name="VehicleHistoryRequest"
      timeToAcknowledgeAcceptance="P2D"
      timeToAcknowledgeReceipt="P2D">
     <DocumentEnvelope 
businessDocument="VehicleHistoryQueryDocument">
     </DocumentEnvelope>
   </RequestingBusinessActivity>
   <RespondingBusinessActivity name="VehicleHistoryRespond"
      timeToAcknowledgeReceipt="P2D">
     <DocumentEnvelope 
businessDocument="VehicleHistoryResponseDocument">
     </DocumentEnvelope>
   </RespondingBusinessActivity>

.///

  <BusinessTransactionActivity name="Dealer Location Activity"
     businessTransaction="Dealer Location"
     fromAuthorizedRole="BulkUsedCarBuyers"
     toAuthorizedRole="General Motors">

Reliable Messaging

Business transactions define reliable messaging exchange between two trading partners using acknowledgments, error handling, logging, and roles. MSH enables reliable messaging for this scenario. For each business transaction in the BPSS document, a unique configuration of reliable messaging can be configured. Sybase's PowerDesigner allows developers to drill down on any step in the BPSS flow and define the reliability details. FIGURE 9 on page 32 shows how the document reliability is defined from a trading partner's RequestAvailableVehicle to the local RespondAvailableVehicle, where it is separately acknowledged for both receipt and acceptance. When the information is returned from RespondAvailableVehicle to RequestAvailableVehicle, an acknowledgment receipt is sent.

Figure 9FIGURE 9 Messaging Reliability

Federating ebXML to Web Services

Up to this stage, the entire application layer consists of XML documents created through a graphical user interface (GUI) tool. Thus, no coding has been required. In this stage, we are mapping our public interface to our private interface and mapping code in Java. Down the road, it is expected that mapping tools will be able to generate most of this code, just as Toplink provided a mapping layer for databases.

After a relationship between trading partners has been established and a BPSS conversation has been initiated, BPSS choreographs back-and-forth communication of information between the two parties, a request will be made to back-end enterprise services at each trading partner. To retrieve the enterprise data a mapping from the public to the private interface is required. Typically, business analysts map B2B transactions to the services available in the back-end SOA. For example, the DealerLocation activity is mapped to the DealerLocater Web service.

FIGURE 10 on page 33 illustrates how XML messages, which are used to communicate between trading partners, are federated to the private back-end systems within a company. The blue represents business activities from the public interface, while orange is the fa_de to private back-end Web service implementations.

Figure 10FIGURE 10 Mapping Business Activity To Back-End SOAP Objects

For example, DealerLocationActivity is mapped to DealerLocator, a SOAP-based application behind the enterprise private interface. The DealerLocator function is an EJB component exposed as a Web service. BPSS calls a message-driven bean, which calls and maps the available dealer information to the DealerLocator input. BPSS is also configured to handle any exceptions.

Note that the code snippet included here is intended to convey the core concepts around the mapping layer. The mapping component is an MDB in the application server that receives an ebXML message, saves off the header information, then formulates and executes a SOAP call. Once the synchronous response is returned, the MDB makes a JAX-M call back to the ebXML infrastructure.

package xx.vehicle.mdb;

public class XXBulkBuyingMDB implements MessageDrivenBean, MessageListener 
{

 ... 
      public void onMessage(Message msg) 
         { 

         // Routing Ids that are used:
 
         Properties msgProps = BpioUtils.jmsToProps(msg);
         String msgId    = 
msg.getStringProperty(BISConst.MESSAGEID);
         String refMsgId   = 
msg.getStringProperty(BISConst.REF_TO_MESSAGEID);
         String cpaId    = 
msg.getStringProperty( BISConst.TPAID);
         String conversationId = 
msg.getStringProperty( BISConst.INSTANCEID);
         String fromPartyId = 
msg.getStringProperty( BISConst.FROM_PARTY);
         String toPartyId  = 
msg.getStringProperty( BISConst.TO_PARTY);
         String service   = 
msg.getStringProperty( BISConst.SERVICE);
         String action    = 
msg.getStringProperty( BISConst.ACTION);

     // Map to and call different web services based on the action 
            
   else if (action.equals("Vehicle History Activity"))
   {
      String text = tm.getText();

    VehicleHistoryQuery vhq = new VehicleHistoryQuery();
      String retProps     = vhq.run(text);	
    content         = retProps.getBytes();
   else if (action.equals("Vehicle Purchase Request Activity"))
    {
   String text = tm.getText();
   PurchaseRequest vhq = new PurchaseRequest();
   String retProps = vhq.run(text);
            ...

   // Return the results to the Process Server to find
 the next step in BPSS
   client.send(dCont, null, retProps, 
EBXMLClientConst.SENDREQUEST_ACTION);
   ... 
   } 

   ... 
   ... The run method of each service makes the WSDL call
    // Making the web service call for Vehicle History Web Service
    VehicleHistory vh = vPort.getVehicleHistory(vin);
    ServiceRecord srs[] = vh.getRecords();

Finally, both the public and the private interface details of the Sun ONE Application Server B2B collaboration prototype system are shown in FIGURE 11. The diagram addresses both the run-time and design-time infrastructure, as well as the architectural details.

Figure 11FIGURE 11 Logical View of Public and Private Interfaces

The preceding graphic illustrates how ebXML technology facilitates the collaborative public side of the relationship, while Web services are used as an interface to private back-end systems. The following tasks are shown in the orange boxes on the left:

  • CPAs and BPSS documents are published on the ebXML Registry.

  • Available trading partners look up the CPA and BPSS.

  • Offline negotiations such as legal contracts are finalized.

  • BPSS orchestrates electronic activity.

The yellow boxes on the right represent Web services. These services are either a fa_de to J2EE applications, other enterprise applications or services, or legacy applications of data through a Web service interface.

  • Available back-end services are resources published in a ebXML Registry.

  • Web services are retrieved from the ebXML Registry.

  • Back-end business processes are built and exposed through the Web services fa_de.

  • The Web services fa_de provides an abstraction to the choreography of back-end Web services.

The overall design highlights two concepts. The first is the declarative nature of how businesses communicate with each other. Using XML documents on top of a standardized infrastructure, trading partners can publish, discover, negotiate, and transact business. A private SOA can be extended to a public interface, enabling businesses to connect existing IT systems to others using open and standardized technologies and protocols.

Second, existing back-end applications and services can be exposed as new services. Process engines or services fa_des choreograph Web services (or proprietary applications abstracted as Web services) into business processes. Developers and business analysts can build and architect both internal and external services, in most cases without writing code.

In this Sun ONE Application Server B2B collaboration prototype, WS-I BP, and ebXML technology provide complementary services and a federated approach to leverage the strengths of each set of standards. The ebXML provides the business-to-business (public) interface that connects trading partners, enabling them to find each other, then negotiate and collaborate in a reliable, secure way. WS-I BP specifications provide the abstraction and choreography of the back-end enterprise services.

As the XML standards, their implementations, and tools evolve, it is expected that the days of proprietary customized point-to-point application development, which give way to the trend of open, standardized, collaborative B2B solutions over the Internet.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020