【转载】BI_EAI_DataMappingModule 18: Data Mapping with Scripts Section Four: Siebel Scripting Module Objectives pleting this module you will be able to: Describe the types of integration situations that require data transformation by scripts rather than by the declarative DTE Create a business service containing a custom script to transform data between a Siebel application and an external application Write code to access input and create output integration object and XML Hierarchy instances Create EAI Value Maps and use them with the EAIGetValueMap and Translate methods Use exception handling functions in data mapping scripts Why you need to know You may need to write custom scripts for data transformation between a Siebel application and an external application When to Use Scripts for Data Mapping There are no integration objects to represent external metadata To aggregate or index multiply-ponents To map two or more ponents, with non-trivial relationships, to the same ponent To exercise programmatic control Example: Using if/then or case statement logic Address Street: 123 Roe St. Street2: Apt. 4G City: Pacifica Address Street: 123 Roe St., Apt. 4G City: Pacifica Source Target Otherwise, use Siebel Data Mapper instead of scriptsto create maps that are easy to define, maintain, and upgrade Data Transformation Tasks In Siebel Tools: Create integration objects Siebel integration objects to represent Siebel data External integration objects to represent external data Create a business service to hold the data transformation code Write the data transformation eScript code Use Siebel data transformation functions to build maps that: Transform ing external data into the Siebel structure Transform outgoing Siebel data into the external system's structure Create Integration Objects Create a Siebel integration object based on a business object Use the Integration Object Builder with the EAI Siebel Wizard Create an external integration object based on a document type definitio