eai data transformation engine

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 CSSEA > 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:

    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.

    The Geek Shall Inherit the Earth.

    Wednesday, September 1, 2010

    We were facing these strange error during ADM import on target system:

    Source component % does not exist.(SBL-EAI-04063)

    This was coming when we tried to import the datamappers inot target system.We follow a continous deveopment model with numerous integrations, and the external IOs for them keep on changing. The problem occurred because the new WSDL imported did not contain some IC levels which were developed and mapped earlier. But the problem was complicated because now we did not know which datamapper to check.

    Now there is a very useful button which could help us here. On the Datamap administration view, there is a validate button on the top applet. It checks the structure of the mapped IOs with the ones compiled into the SRF and threw up validation errors. For some time now I have been wondering the functionality behind this button.
    I found this in the Siebel log files when the button was clicked:

    Begin: Business Service ‘EAI Data Transformation Engine’ invoke method: ‘Validate’

    But if you check the definition of this BS in tools, you will not fin the Validate method. But after a little more tweaking, I was able to figure out the input parameters. One thing I found was that if the Datamap is valid, the BS does not return or throw any message, and if there is any validation error, it throws an exception. Hence if multiple datamps need to be validated, the try catch loop must be put inside a loop. I wrote a simple script at client side services which validates multiple datamaps in one go. The search spec can be modified according to your project requirements.

    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
    <
    var oBCDataMap = «»;
    var sMessage= «»;
    var iCount = 0;
    oBCDataMap = TheApplication().GetBusObject(«EAI Data Map»).GetBusComp(«EAI Object Map»);
    oBCDataMap.ClearToQuery();
    oBCDataMap.SetSearchSpec(«Source Object Name»,»*»);
    oBCDataMap.ExecuteQuery(ForwardOnly);
    var oBSDTE = TheApplication().GetService(«EAI Data Transformation Engine»);
    var psInput = TheApplication().NewPropertySet();
    var psOutput = TheApplication().NewPropertySet();
    var bIsRecord = oBCDataMap.FirstRecord()
    while(bIsRecord)
    <
    psInput.Reset();
    psOutput.Reset();
    try
    <
    psInput.SetProperty(«MapName»,oBCDataMap.GetFieldValue(«Name»));
    oBSDTE.InvokeMethod(«Validate»,psInput,psOutput);
    >
    catch(e)
    <
    sMessage = sMessage + oBCDataMap.GetFieldValue(«Name») + «:» +e.toString() + »
    «;
    >
    iCount = iCount + 1;
    bIsRecord = oBCDataMap.NextRecord();
    >

    When the code is execute, it validates all Datamaps using the EAI Data Transformation Engine BS’s Validate method, and presents the errors in a message box.

    We have a Siebel 7.8 application with two integration objects, and both have an integration component for the attachments. One of them defines the attachment field as DTYPE_ATTACHMENT , while the other defines it as DTYPE_TEXT (it’s used in an inbound web service which reads the base64 data string and writes it to a file on disk).

    I’m trying to convert data from an IO to the other using UI data mappings and the EAI Data Transformation Engine service, but I have been unsuccesfull so far:

    • If I transform the data from DTYPE_ATTACHMENT to DTYPE_TEXT , it doesn’t raise any error, but the attachment base64 data is lost and I only get the row_id in the resulting XML.
    • If I transform the data from DTYPE_TEXT to DTYPE_ATTACHMENT , I get this error:

    Source expression generated attachment >

    Is there any way in which I can convert data from one of the integration objects to the other, without losing the base64 data? I don’t care if the transformation is «attachment to text» or «text to attachment», I can build what I need either way. I can’t change the definition of the integration objects, but I can create a new one to use as an intermediate step, if needed.

  • Оцените статью