Business Processes and Rules: Siebel Enterprise Application Integration > Data Mapping Using Scripts >

EAI Data Transformation

The Siebel Data Transformation Functions are a framework for building data transformation maps. Data transformation maps act as import and export filters, preparing data from an external system for entry into Siebel applications and preparing data in Siebel applications for export.

Data transformation maps are created as business services using Siebel eScript. You invoke them as part of an EAI workflow process.

A data transformation map reads data from an input structure and transfers it to an output structure, transforming it along the way. The map developer creates a custom eScript function to do the transformation. The Data Transformation Functions provide a convenient way to read the input data and generate results. They also provide a framework for invoking your map functions, handling errors, and accessing other EAI resources.

Setting Up a Data Transformation Map

You create your data transformation map in Siebel Tools in a business service, then you compile it into an .srf file. You can organize your maps in many different ways. Each business service you create can contain one or more maps. You can, in fact, use several business services to organize a large number of maps into logical groups.

To define a data transformation business service in Siebel Tools

  1. Launch Siebel Tools.
  2. Choose a locked project.
  3. Create a new business service.
  4. Choose the CSSEAIDTEScriptService class for the business service.
  5. Double-click the Business Services Methods folder and add the method Execute.
  6. Select the Business Service Method Arg folder and add the arguments for the Execute method. For a list of arguments and their description, see DTE Business Service Method Arguments. The arguments to include are:
    • MapName
    • An input argument. Select one of SiebelMessage, XMLHierarchy, or MIMEHierarchy as the argument name, based on the type of input.
    • An output argument. Required if the output object is a different type than the input argument. Select one of SiebelMessage, XMLHierarchy, or MIMEHierarchy as the argument name.

      NOTE:  If the input and output types are the same then the same argument entry is used for both.

    • OutputType
    • InputType(Optional). This is required only when passing the business service input property set to the map function without interpretation. This is done by specifying the InputType as ServiceArguments.

      NOTE:  Most transform maps use SiebelMessage for both the input and output arguments. This is for mapping one integration object to another. For details, see DTE Business Service Method Arguments.

Once you have created the business service you need to write the Siebel eScript code to perform the data transformation.

To write a script for DTE business service

  1. Choose the Business Service object and select the business service you want to contain the transformation map.
  2. Right-click to display the pop-up menu.
  3. Choose Edit Server Scripts and choose eScripts as the scripting language if you are prompted to select scripting language.
  4. In the (declarations) procedure of the (general) object, add the line:

    #include "eaisiebel.js"

  5. In the Service_PreInvokeMethod function of the service, change the function to the following:

    function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
    return EAIExecuteMap (MethodName, Inputs, Outputs);

    Your data transformation map is run as a business service invoked from a workflow process. Business service scripts have a standard entry point, Service_PreInvokeMethod. Although the script environment provides you with a boilerplate function by this name, you need to modify it, as described in the preceding steps, to include the call to the EAIExecuteMap function.

    1. The MethodName must be Execute and is used by Siebel Workflow. The name of your function is the name you supply for the MapName argument to the Execute method.
    2. Inputs is the input message from workflow containing service arguments—for example, MapName and Output Integration Object Name—and the integration message to be transformed. Outputs is the argument used to return data—for example, Siebel Message. MapName specifies the map function to be executed and must be the name of one of the functions you defined in the business service. For examples of DTE Business Services, see Siebel Connector for Oracle Applications.
Business Processes and Rules: Siebel Enterprise Application Integration Copyright © 2006, Oracle. All rights reserved.