The Siebel Universal Application Network (UAN) is a set of specifications for integrating applications based on the business process that a company needs—not on the specific applications the company is trying to integrate. The specific business processes supported in UAN are individually known as integrated business processes (IBPs). The advantage of a specification being based on a business process and being application-agnostic is that a company can "plug and play" integration servers if it chooses to do so. The specification for the business process does not change.
On the other hand, there are specific details related to the implementation of the business process specifications on a given integration server platform. Microsoft's implementation of UAN results in a specification called UAN 2.0 for Microsoft. UAN 2.0 for Microsoft takes the UAN 2.0 specification from Siebel and implements it on Microsoft BizTalk Server 2004. Furthermore, the UAN 2.0 for Microsoft specification focuses on business processes that are specific to the vertical industries known as communications, media, and energy (CME).
It is important to gain a high-level understanding of how the solution works for the CME_ProcessOrder IBP before reading the rest of this paper. The CME_ProcessOrder IBP calls the CME_ProcessService and CME_UpdateOrderLineItem IBPs in turn. The following figure shows a block diagram of how messages are passed between the systems.
Figure 3 ProcessOrder IBP message flow
These are the steps in the message flow shown in the preceding figure:
-
An order is created from within the Siebel application.
-
The order is transmitted by using an HTTP Post message to the specific receive location and port of the BizTalk Server that is configured to receive messages from this IBP.
-
The UAN 2.0 implementation on BizTalk Server processes the message and sends it to SAP through a Web service. The Web service wraps the SAP Business Application Programming Interface (BAPI) to create an order in the system.
-
SAP receives the request to create an order, creates it, and generates a unique order number.
-
SAP transmits the order number back to BizTalk Server through the return parameter of the BAPI call.
-
BizTalk Server processes the message containing the order number and sends it back to Siebel through an HTTP Post message so that the order number field and order status information can be updated within Siebel.
-
Siebel receives the order number from BizTalk Server and updates the order number field for the order. Siebel stores this SAP order number within the order header information. The corresponding order header and order line item processing status is changed to "Processed," indicating that it was received by the back-end SAP system for fulfillment.
The following sections describe these high-level steps in more detail.
Creating an order in Siebel is straightforward. After you log in and click the Orders tab, a screen appears showing past orders, as shown in the following figure.
Figure 4 Sales orders screen
Create a New Sales Order
To begin this solution scenario, you create a new sales order in Siebel by using the following procedure:
-
On the Sales Orders tab, click New.
A new order is created with a status of Pending.
-
In the Type list, select Sales Order.
-
In the Account list, select the desired account.
Our example uses ABC Supplies.
-
In the Price List drop-down list, select the desired price list.
Our example uses HP Price List.
-
In the Service Account list, select the desired service account.
Our example uses ABC Supplies.
-
In the Billing Account list, select the desired billing account.
Our example uses ABC Supplies.
Add Line Items to the Order and Submit It
The next step in this scenario is to add two line items to the order by using the following procedure:
-
On the Line Items tab, click New to create a new line item for the order.
The first new product is selected. This example item is product number HPDL360G3, which is an HP Proliant DL360 server.
-
On the Line Items tab, click New again to create the second line item.
The second new product is selected. This example item is product number HPDL380G3, which is an HP Proliant DL380 server.
-
Click Submit to submit the order.
The following figure shows the details of how the message flows through the process after it is created in Siebel.
Figure 5 Message flow for ProcessOrder IBP
Siebel Transmits the Message to BizTalk Server
Siebel UAN 2.0 for Microsoft transmits XML payload messages to BizTalk Server by using HTTP posts. BizTalk Server listens on specific configured receive locations for those messages. Because our scenario uses the CME_ProcessOrder IBP, BizTalk Server expects the URL to be in the format:
http://<BizTalkServerAddress>/ProcessOrderHTTP/BTSHTTPReceive.dll
BTSHTTPReceive.dll is an Internet Information Services (IIS) ISAPI extension that traps and processes messages at a specific URL and transmits the messages to BizTalk Server. Each UAN IBP has a specific receive location URL.
In the case of the CME_ProcessOrder IBP, after the HTTP Post message is received, the schema of the message is validated against the CME_ProcessOrder application service interface (ASI).
BizTalk Server Processes the Message
After the received message is validated against the CME_ProcessOrder ASI, it is ready to begin the orchestration process. Orchestration is the flow through which BizTalk Server processes messages. The orchestration engine handles all aspects of passing the message from its source to its destination, such as validation, data formats, and process logic. The adapter simulation flow (ASF) part of the UAN orchestration handles the flow of the message, including receiving the message from Siebel, handling errors, calling other orchestrations, and returning responses.
The ASF for the CME_ProcessOrder IBP, called CMEProcessOrderSiebelSrcASF, receives the posted HTTP message through the ASI and passes the message to the IBP proxy, called CMEProcessOrderSiebel75Proxy. The IBP proxy is responsible for converting the external representation of the Siebel message to the common object format. The IBP proxy validates the Siebel message, checks for errors, and creates a common object representation of the Siebel order.
The CME_ProcessOrder IBP invokes two additional IBPs to encapsulate the required functionality specified in the ProcessOrder UAN specification. The CME_ProcessOrder IBP calls (in this order):
-
CMEProcessService. Handles the service content for an order.
-
CMEUpdateOrderLineItem. Handles the updating of the line items on an order.
After the common object is created, the message is brokered to the CMEProcessService IBP orchestration so that the message can be processed. After the CMEProcessService IBP is invoked, the message is mapped to the csiProcessService output specification.
SAP Receives and Processes the Message
SAP receives the message through the Business Application Programming Interface (BAPI) and creates the order. When it creates the order, an order number is generated within SAP.
SAP Transmits the Order Number Back to BizTalk Server
The SAP sales order number is passed back as the return parameter of the BAPI call. The response document passed back by the Web service wrapper contains the SAP order number as well as the processing status at the order header and order line item levels.
BizTalk Server Processes the Message Containing the Order Number
BizTalk Server combines the SAP response XML from the Web service call and the initial csiProcessService content XML to create the csiUpdateOrderLineItem XML document. This document is the common object representation of the update order information.
Siebel Updates the Order Number Field for the Order
Siebel takes the update order information, updates the Siebel order information with the SAP order number, and updates the order header and order line item status to "processed," indicating that this order has been submitted to the back-end SAP system.
Now that you have read about the concepts behind UAN and the final result of the Siebel User Week demonstration, you can understand the details of how the demonstration was implemented by using UAN 2.0 for Microsoft.
BizTalk Server 2004 does the majority of the work in the Siebel User Week demonstration. This section outlines the details of how BizTalk Server was used to implement the CME_ProcessOrder IBP, which is shown in the earlier figure as "Process Order."
Orchestrations
The ability to perform orchestrations is one of the key strengths of BizTalk Server 2004. Orchestrations allow you to visually create your business processes and how they interact with internal and external components, specifications, and objects. Creating and configuring orchestrations is as simple as dragging objects from a toolbox and configuring properties for those objects. The following figure shows the orchestration that creates an order.
Figure 6 Orchestration to create an order
The CME_CreateOrder orchestration is used to sequentially handle the business processes associated with creating the order and, in turn, call other orchestrations that are part of the business process. For example, CME_CreateOrder must call the CME_ProcessService and CME_UpdateOrderLineItem IBPs.
Mappings
A mapping is a way to correlate fields from a source schema file (XSD) to a destination schema file. It enables you to map how fields from the source message are used in the destination message. Additionally, you use special tools, called functoids, to transform those fields. A functoid is a BizTalk Server mapping tool that contains prepackaged functionality that can be used to transform schema fields. For example, BizTalk Server 2004 contains a functoid to concatenate two fields. Other functoids perform mathematical calculations, create custom scripts, and apply date/time functions.
UAN 2.0 for Microsoft includes a set of custom functoids that are used specifically with UAN. These functoids are all contained within the library named Microsoft.MCS.UAN.CustomFunctoids.dll. This .NET assembly is shipped by Siebel as part of UAN 2.0 for Microsoft. The functoids contained within the library are:
-
UAN ConcatSequenceFormat. Concatenates the string value of each node in the order specified, using a string separator between entries.
-
UAN FormatDate. Takes a date string in ISO 8601 format and converts it according to the specified format string.
-
UAN FormatDateTime. Takes a date/time string in ISO 8601 format and converts it according to the specified format string.
-
UAN ParseDate. Parses the given date string into an ISO 8601 date string according to the specified format string.
-
UAN ParseDateTime. Parses the given date/time string into an ISO 8601 date/time string according to the specified format string.
The following figure shows the BizTalk Server 2004 Mapper.
Figure 7 BizTalk Mapper
Bindings
A BizTalk binding is a named location where messages are sent or received. An example of a binding is a specific HTTP port where messages are received into BizTalk Server. BizTalk Server 2004 allows you to optionally specify a binding file, which contains port and location information, when you deploy your BizTalk assemblies. Binding files are supplied as part of UAN 2.0 for Microsoft in the form of XML files. These XML files can be specified during the deployment of .NET assemblies, as described in the following section.
Deployment
BizTalk Server 2004 includes a Deployment Wizard that enables you to easily deploy .NET assemblies to your production or testing environments. By using the wizard, you can deploy and register your compiled BizTalk Server projects in the target environment in only a few steps. Additionally, you can opt to specify a binding file for your business processes to use. UAN 2.0 for Microsoft includes default binding files for all IBPs, but these files must be customized prior to deployment to reflect differences in your environment.
The wizard, shown in the following figure, guides you through the process of deploying .NET assemblies and binding files to the database.
Figure 8 BizTalk Deployment Wizard
The Deployment Wizard also provides an easy way to perform the following operations:
-
Deploy a BizTalk assembly to a database. Deploys a .NET orchestration assembly and binding file to the BizTalk Configuration database.
-
Import a BizTalk assembly binding from a file. Imports only the binding file to the BizTalk Configuration database; does not deploy a .NET assembly.
-
Export a BizTalk assembly binding to a file. Exports a binding already stored in the BizTalk Configuration database to a file. This file can be used on other BizTalk Servers or to back up the bindings.
-
Remove a BizTalk assembly from a database. Removes a .NET assembly from the BizTalk Configuration database.
SAP
Because UAN 2.0 for Microsoft does not include direct support for SAP, the Siebel User Week demonstration included a bit of customized code that was developed by using the SAP .NET Connector, as described in the following sections.
SAP .NET Connector
The SAP .NET Connector is a technology that provides a way for .NET Framework applications to communicate with SAP ERP systems. The SAP .NET Connector provides Remote Function Call (RFC), Business Application Programming Interface (BAPI), and Intermediate Document (IDoc) integration with SAP by exposing these SAP interfaces to the .NET platform.
The SAP .NET Connector user interface is a Visual Studio .NET add-in that enables users to generate .NET proxies that wrap SAP RFC and BAPI functionality, and exposes the proxies as .NET classes leveraging .NET data types. By doing this, the SAP .NET Connector hides the complexity of managing Advanced Business Application Programming (ABAP) data types and invoking the SAP functionality at the lower RFC API level. The .NET proxies map the .NET data types to the corresponding ABAP data types and invoke the RFC. The results from the invocation are mapped from the returned ABAP data to the .NET data types.
The SAP .NET Connector also provides classes to send and receive IDocs from SAP.
Web Service Wrapper
Licensed To Code created a custom Web service, called SAP_Salesordercreate_Webservice, to create the SAP sales order. The following figure illustrates the discussion that follows.
Figure 9 Web service wrapper
The SAP_SD_Proxy .NET proxy was generated through the SAP .NET Connector to invoke the SAP Sales Order Business Object, named CreateFromDat1BAPI. The proxy is generated to expose the underlying RFC, called BAPI_SALESORDER_CREATEFROMDAT1.
The LTC_SAP_BAPI_Wrapper class wraps the functionality of this generated proxy and simplifies the interface to make this RFC call by providing a simpler method, called CreateSAPsalesOrderUsingXML. This method takes in an XML instance that contains the data passed by the Siebel application, which is a partial subset of the data required to create a sales order in the SAP system. This XML instance has the "sold-to" customer information, line item information, and associated quantity. The LTC_SAP_BAPI_Wrapper class parses the XML, extracts this information, and calls the BAPI_SALESORDER_CREATEFROMDAT1 RFC by automatically filling in the other necessary parameters required by SAP to successfully execute the call to create a sales order within the SAP system. After the RFC call is made, the corresponding sales order number created in the SAP system is inserted in the original input XML and passed back.
The object, named SAP_Salesordercreate_Webservice, wraps the functionality of the LTC_SAP_BAPI_Wrapper and exposes it as a Web service that is invoked from the BizTalk application.