Muokkaa

Jaa


Run Operations on Business Components Using BizTalk Server and the Siebel adapter

The Siebel adapter surfaces operations that can be invoked on a business component. The operations on business components can be categorized as:

How to Perform Operations on a Business Component

Performing an operation on a Siebel system using the Siebel adapter with BizTalk Server involves procedural tasks described in Building blocks to create BizTalk applications with the Siebel adapter.

To complete an operation on a business component, these tasks are:

  1. Create a BizTalk project and generate schema for operation you want to invoke on the business component.

  2. Create messages in the BizTalk project for sending and receiving messages from the Siebel system.

  3. Create an orchestration to invoke an operation in the Siebel system.

  4. Build and deploy the BizTalk project.

  5. Configure the BizTalk application by creating physical send and receive ports.

  6. Start the BizTalk application.

    This topic provides instructions to perform these tasks.

Sample Based On This Topic

A sample, SiebelAccount, based on this topic is also provided with the BizTalk Adapter Pack. For more information, see Samples for the Siebel adapter.

Generating Schema

In this topic, to demonstrate how to invoke operations on a business component, schema are generated for the Insert operation in the Account business component. See Retrieving Metadata for Siebel Operations in Visual Studio for more information about how to generate schema.

Defining Messages and Message Types

The schema that you generated earlier describes the "types" required for the messages in the orchestration. A message is typically a variable, the type for which is defined by the corresponding schema. You must link the schema you generated in the first step to the messages from the Orchestration view of the BizTalk project.

For this topic, you must create two messages—one to send a request to the Siebel system and the other to receive a response.

Perform the following steps to create messages and link them to the schema:

  1. Open the orchestration view the BizTalk project, if not already open. Click View, point to Other Windows, and click Orchestration View.

  2. In the Orchestration View, right-click Messages, and then click New Message.

  3. Right-click the newly create message and select Properties Window.

  4. In the Properties pane for Message_1, do the following:

    Use this To do this
    Identifier Type Request.
    Message Type From the drop-down list, expand Schemas, and select SiebelAccount.SiebelBindingSchema.Insert, where SiebelAccount is the name of your BizTalk project. SiebelBindingSchema is the schema generated for invoking the Insert operation on Account business component.
  5. Repeat the previous step to create a new message. In the Properties pane for the new message, do the following:

    Use this To do this
    Identifier Type Response.
    Message Type From the drop-down list, expand Schemas, and select SiebelAccount.SiebelBindingSchema.InsertResponse.

Setting up the Orchestration

You must create a BizTalk orchestration to use BizTalk Server for performing an operation on a Siebel business component. In this orchestration, you drop a request message at a defined receive location. The Siebel adapter consumes this message and passes it on to the Siebel system. The response from the Siebel system is saved to another location. A typical orchestration for performing operations on Siebel business components would contain:

  • Send and receive shapes to send messages to Siebel and receive responses.

  • A one-way receive port to receive request messages to send to Siebel.

  • A two-way send port to send request messages to Siebel and receive responses.

  • A one-way send port to send the responses from Siebel to a folder.

    A sample orchestration for the Insert operation on an Account business component resembles the following:

    Orchestration to insert data in Siebel BC

Adding Message Shapes

Make sure you specify the following properties for each of the message shapes. The names listed in the Shape column are the names of the message shapes as displayed in the orchestration above.

Shape Shape Type Properties
ReceiveXML Receive - Set Name to ReceiveXML
- Set Activate to True
SendToLOB Send - Set Name to SendToLOB
ReceiveResponse Receive - Set Name to ReceiveResponse
- Set Activate to False
SendResponse Send - Set Name to SendResponse

Adding Ports

Make sure you specify the following properties for each of the logical ports. The names listed in the Port column are the names of the ports as displayed in the orchestration.

Port Properties
FileIn - Set Identifier to FileIn
- Set Type to FileInType
- Set Communication Pattern to One-Way
- Set Communication Direction to Receive
LOBPort - Set Identifier to LOBPort
- Set Type to LOBPortType
- Set Communication Pattern to Request-Response
- Set Communication Direction to Send-Receive
SaveResponse - Set Identifier to SaveResponse
- Set Type to SaveResponseType
- Set Communication Pattern to One-Way
- Set Communication Direction to Send

Specify Messages for Action Shapes and Connect to Ports

The following table specifies the properties and their values to be set to specify messages for action shapes and linking them to the ports. The names listed in the Shape column are the names of the message shapes as displayed in the orchestration above.

Shape Properties
ReceiveXML - Set Message to Request
- Set Operation to FileIn.Insert.Request
SendToLOB - Set Message to Request
- Set Operation to LOBPort.Insert.Request
ReceiveResponse - Set Message to Response
- Set Operation to LOBPort.Insert.Response
SendResponse - Set Message to Response
- Set Operation to SaveResponse.Insert.Request

After you have specified these properties, the message shapes and ports are connected and your orchestration is complete.

You must now build the BizTalk solution and deploy it to a BizTalk Server. For more information, see How to Build Orchestrations and Deploying BizTalk Assemblies from Visual Studio into a BizTalk Application.

Configuring the BizTalk Application

After you have deployed the BizTalk project, the orchestration you created earlier is listed under the Orchestrations pane in the BizTalk Server Administration console. You must use the BizTalk Server Administration console to configure the application. How to Create an Application lists the steps.

Configuring an application involves:

  • Selecting a host for the application.

  • Mapping the ports that you created in your orchestration to physical ports in the BizTalk Server Administration console. For this orchestration you must:

    • Define a location on the hard disk and a corresponding file port where you will drop a request message. The BizTalk orchestration will consume the request message and send it to the Siebel system.

    • Define a location on the hard disk and a corresponding file port where the BizTalk orchestration will drop the response message containing the response from the Siebel system.

    • Define a physical WCF-Custom or WCF-Siebel send port to send messages to the Siebel system. You must also specify the action in the send port. For information about how to create ports, see Manually configure a physical port binding to the Siebel adapter.

      Note

      Generating the schema using the Consume Adapter Service BizTalk Project Add-in also creates a binding file containing information about the ports and the actions to be set for those ports. You can import this binding file from the BizTalk Administration Console to create send ports (for outbound calls). For more information, see Configure a physical port binding using a port binding file to Siebel.

Starting the Application

You must start the BizTalk application for performing an Insert operation on the Account business component in Siebel. For instructions on starting a BizTalk application, see Start a BizTalk Application or Start an Orchestration.

At this stage, make sure:

  • The FILE receive port to receive request messages for the orchestration is running.

  • The FILE send port to receive the response messages from the orchestration is running.

  • The WCF-Custom or WCF-Siebel send port to send messages to the Siebel system is running.

  • The BizTalk orchestration for the operation is running.

Executing the Operation

After you run the application, you must drop the request message to the FILE receive location. The schema of the request message must conform to the schema of the Insert operation (on Account business component) you generated earlier. For example, the request message to insert a record in the Account business component is:

<Insert xmlns="http://Microsoft.LobServices.Siebel/2007/03/BusinessObjects/Account/Account/Operation">  
  <ArrayOfAccountInsertRecord>  
    <AccountInsertRecord xmlns="http://Microsoft.LobServices.Siebel/2007/03/BusinessObjects">  
      <Currency_x0020_Code>usd</Currency_x0020_Code>  
      <Current_x0020_Volume>9</Current_x0020_Volume>  
      <Customer_x0020_Account_x0020_Group>Sold-To Party</Customer_x0020_Account_x0020_Group>  
      <Location>Location_1</Location>  
      <Main_x0020_Phone_x0020_Number>4256543212</Main_x0020_Phone_x0020_Number>  
      <Name>Name_Surname</Name>  
      <Party_x0020_Name>test_party</Party_x0020_Name>  
      <Primary_x0020_Address_x0020_Id>1212 street</Primary_x0020_Address_x0020_Id>  
    </AccountInsertRecord>  
  </ArrayOfAccountInsertRecord>  
</Insert>  

See Message Schemas for Business Component Operations for more information about the schema for the request message.

The orchestration consumes the request message and passes it to the Siebel system. The response from the Siebel system is saved at the other FILE location defined as part of the orchestration. For example, the response from Siebel system for the above request message is:

<?xml version="1.0" encoding="utf-8"?>  
<InsertResponse xmlns="http://Microsoft.LobServices.Siebel/2007/03/BusinessObjects/Account/Account/Operation">  
  <InsertResult>  
    <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">1-8ANYV</string>  
  </InsertResult>  
</InsertResponse>  

Possible Exceptions

For information about the exceptions you might encounter while performing an operation on business component using BizTalk Server, see Exceptions and Error Handling with the Siebel adapter.

Best Practices

After you have deployed and configured the BizTalk project, you can export configuration settings to an XML file called the binding file. Once you generate a bindings file, you can import the configuration settings from the file so that you do not need to create the send ports, receive ports, etc. for the same orchestration. For more information about binding files, see Reuse adapter bindings in the Siebel adapter.

See Also

Develop BizTalk Applications using the Siebel adapter