7Industry XML Connector Factory APIs

Industry XML Connector Factory APIs

This chapter describes the Industry XML Factory Classes and their methods.

Industry XML Connector Factory Classes

The Industry XML Connector Factory Classes are developed based on the Siebel Financial Services EAI infrastructure aimed at supporting variety XML Standards extension for the Industry XML Connector described in Siebel Financial Services EAI Architecture The factory classes are built to leverage the functionality of Industry XML Connector while giving customers the opportunity to customize generic connector business services through configuration and programming scripts. In most cases, scripts are needed for presentation purpose, but in rare cases they may be used to add or enhance the connector functionality.

To set up customized XML Connector

  1. Configure the customized connector by configuring the four business services based on the factory classes, configure methods, and method arguments for each business service which should be identical to Industry XML Connector business services.

    Note: For a list of methods and method arguments available for the four business services, see Siebel Financial Services EAI Architecture
  2. Customize the behavior of the connector through the user properties of the four business services configured in Step 1.

    Note: For a list of available user properties for the four business services, see Siebel Financial Services EAI Architecture
  3. Overwrite any extension method from the factory classes to fulfill the different syntax and rules of a desired XML standard when applicable.

  4. Generate all the necessary integration objects and deliver the changes to the integration branch.

  5. Configure the data transformation maps to map the internal and external integration objects.

  6. Configure the business logic and flow using workflow and invoke these four customized business services in the workflow steps.

Industry XML Connector Factory Classes Methods

The Industry XML Connector Factory consists of four main classes:

  • Transaction Manager

  • Data Transformation Engine

  • Converter

  • Dispatcher

Note: For a description of functionality of each class, see Industry XML Connector.

Each class exposes a number of methods to fulfill customization and extension. The collection of these methods made up the Industry XML Connector Factory APIs. Using the overwrite methods, you can use the functionality of both Industry XML Connector as well as Siebel Financial Services EAI infrastructure for enterprise data sharing and data synchronization in your integration implementation while obeying the rules of data exchange set forth by the legacy or back-end systems such as specific XML structure and envelope details.

Note: Only methods absolutely needed should be overwritten to modify the generic behavior. A list of available methods for each module is provided later in This chapter.

    Transaction Manager Factory Class Methods

    The Transaction Manager Factory Class (CSSFAELTransMgrService) provides the methods described in the following table that you can overwrite.

    Method Description

    PreProcess

    You can use this method to modify or reserve information within the integration object instance.

    PostProcess

    You can use this method to modify or restore stored information into the integration object instance.

      Data Transformation Engine Factory Class Methods

      The Data Transformation Engine Factory Class (CSSFAELDTEService) provides the methods described in the following table that you can overwrite.

      Method Description

      PreProcess

      Allows application developers to modify or reserve information within the integration object instance.

      PostProcess

      Allows application developer to modify or restore stored information into the integration object instance.

      ProcessMessage

      Allows application developer to process information within the root tag of message.

      ProcessHeader

      Allows application developer to process information within the header portion of message.

        Converter Factory Class Methods

        The Converter Factory Class (CSSFAELCnvService) provides the methods described in the following table that you can overwrite.

        Method Description

        GenerateEnvelope

        Allows application developer to prepare the envelope section of the XML message to be sent.

        GenerateHeader

        Allows application developer to prepare the header section of the XML message to be sent.

        GenerateError

        Allows application developer to generate the fault section of the XML message to be responded to.

        GeneratePI

        Allows application developer to prepare the processing instruction section of the XML message to be sent.

        ProcessEnv

        Allows application developer to process the envelope section of the XML message received.

        ProcessHdr

        Allows application developer to process the header section of the XML message received.

        ProcessError

        Allows application developer to process the fault section of the XML message received.

        ProcessPInst

        Allows application developer to process the processing instruction section of the XML message received.

        PreProcessBody

        Allows special processing of the body section of the XML message.

        PostProcessBody

        Allows special processing of the body section of the XML message after conversion is done.

        StartProcess

        Allows special processing of the body section of the XML message for each command.

        EndProcess

        Allows special processing of the body section of the XML message for each command after conversion is done.

          Dispatcher Factory Class Methods

          The Dispatcher Factory Class (CSSFAELDispService) provides the methods that you can overwrite. These methods are described in the following table.

          Method Description

          DispatchEnvelope

          Allows application developer to identify the envelope section of the message, tag it, and insert other information such as its matching integration object involved.

          DispatchHeader

          Allows application developer to identify the header section of the message, tag it, and insert other information such as its matching integration object name.

            Industry XML Connector Factory Method Arguments

            All extension methods for the factory classes are based on the Siebel Property Set data structure, with no exception. The following table lists the method arguments.

            Argument Description

            XMLHierarchy

            Input Property Set

            XMLHierarchy

            Output Property Set

            Siebel Connector for Credit Card Application XML

            The following example shows the extension connector that implements the Industry XML classes through the sets of APIs. It shows how each of the steps is carried out to achieve supporting the credit card application services.

            Sample Result

            - <CRM>
             - <SignonRq>
              - <UsrLoginSegment>
                <LoginUserId>UserId</LoginUserId> 
                <LoginCurPassword>PASSWD</LoginCurPassword> 
                <LoginNewPassword /> 
              </UsrLoginSegment>
             </SignonRq>
            - <CreditCardSvcRq>
             - <CardAppAddRq>
              - <AccountData>
                <UserId>1-DLN</UserId> 
                <CompanyCd>1-109</CompanyCd> 
                <DivisionCd>1-109</DivisionCd> 
                <ServCtrCd>1-109</ServCtrCd> 
                <BranchCode>1-16UU</BranchCode> 
                </AccountData>
              - <ApplicationInfo>
                <ApplicantId>AAA CreditCard Join</ApplicantId> 
                <PrioritySortCode /> 
                <ApplSourceCode /> 
                <WorklistModeFlag>03 - Qualification</WorklistModeFlag> 
                <ApplicationClass>Credit Card Application</ApplicationClass> 
                </ApplicationInfo>
              - <CardholderInfo>
                <FirstName>Enid</FirstName> 
                <Mi>J</Mi> 
                <LastName>Alberts</LastName> 
                <City>San Jose</City> 
                <State>CA</State> 
                <ZipCode>95110</ZipCode> 
                </CardholderInfo>
               </CardAppAddRq>
              </CreditCardSvcRq>
            </CRM>
            

            To implement the industry XML classes through the sets of APIs

            1. Configure the following four business services to support all the methods and method arguments in Industry XML Connector:

              • FINS EL XML Transaction Manager

              • FINS EL XML Data Transformation Engine

              • FINS EL XML Converter

              • FINS EL XML Dispatcher

              For example, the FINS EL XML Data Transformation Engine business services has Execute, ExecuteOutbound, and ExecuteSave methods.

              Note: The “FINS Connector Factory" project, in the Sample database, includes all the business services configurations. You can access the project through Siebel Tools.
            2. Configure user properties for the four business services configured in Step 1.

              Note: The “FINS Connector Factory" project, in the Sample database, includes all the user properties configurations. You can access the project through Siebel Tools.
            3. Overwrite a few (necessary) Industry XML APIs to modify the presentation logic.

              The following example shows the customized converter over the functions to generate message header and preprocess the body section. In the GenerateHeader function, the application calls the CreateSignOn function to generate the login information portion of the XML document. In the PreProcessBody function, the service aggregate <CreditCardSvcRq> is added to embed the <CardAppAddRq> message aggregate. Your scenario may be different.

              Note: The common usage of MethodName in standard scripting is a publicly available business service method such as PropSetToXMLPropSet. However, in this example, the MethodName does not correspond to the business service method when implementing the factory classes. Instead, it refers to the methods in the Industry XML APIs.
              function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
              {
                  var retVal = CancelOperation;
                  if (MethodName == "GenerateHeader") {
                      Func_GenerateHeader(Inputs, Outputs);
                  }
                  else if (MethodName == "PreProcessBody") {
                      Func_PreProcessBody(Inputs, Outputs);
                  }
                  else {
                     retVal = ContinueOperation;
                  }
                 return (retVal);
              } 
              // Overwrite GenerateHeader method to handle SignonRq message
              function Func_GenerateHeader (Inputs, Outputs)
              {
                var child;
                // Enumerate the first layer header definition  
                for (var i = 0; i < Outputs.GetChildCount(); i++)
                {
                 child = Outputs.GetChild(i);
                
                    if ( child.GetType() == "SignonRq")
                 {    
                   // Create SignOn Segment
                   Func_CreateSignOn(child);
                 }
                 else if (child.GetType() != "xxxSvcRq")
                 {
                   // Remove other header definitions
                   Outputs.RemoveChild(i--);
                 }
                }  
              }
              // Overwrite PreProcessBody method to add service aggregate
              function Func_PreProcessBody (Inputs, Outputs)
              {
                var serviceName;
                
                if (Inputs.PropertyExists("SiebelFINSObjType"))
                {
                    Func_CopyPropSet(Inputs, Outputs);
                }   
                else if (Inputs.PropertyExists("IFX Service Name"))
                {
                   serviceName = Inputs.GetProperty("IFX Service Name");
                   // add CreditCardSvcRq aggregate     
                   Outputs.SetType(serviceName);
               
                   // copy CardAppAddRq aggregate
                   Outputs.AddChild(Inputs.Copy());
                }
                else
                {
                   Func_CopyPropSet(Inputs, Outputs);
                }  
              }
              // Sign on utility to access user name and password
              function Func_CreateSignOn(Inputs)
              {
                var child;
                var grdChild;
                // Enumerate the first layer header definition  
                for (var i=0; i < Inputs.GetChildCount(); i++)
                {
                 child = Inputs.GetChild(i);
                 if ( child.GetType() == "UsrLoginSegment")
                 {
                    for (var j=0; j < child.GetChildCount(); j++)
                    {
                        grdChild = child.GetChild(j);
                        if (grdChild.GetType() == "LoginUserId")
                       {
                          grdChild.SetValue("UserId");   
                       }
                       if (grdChild.GetType() == "LoginCurPassword")
                       {
                          grdChild.SetValue("PASSWD");
                       }
                    }
                 }
                 else
                 {
                   // Remove other header definitions
                   Inputs.RemoveChild(i--);
                 }
                }
              }
              // Generic copy property set utility
              function Func_CopyPropSet( Inputs, Outputs)
              {
                var propName = "";
                var propVal = "";
                var child;
                Outputs.SetType(Inputs.GetType());
                Outputs.SetValue(Inputs.GetValue());
                propName = Inputs.GetFirstProperty();
                while (propName != "")
                {
                  propVal = Inputs.GetProperty(propName);
                  Outputs.SetProperty(propName, propVal);
                  propName = Inputs.GetNextProperty();  
                }    
                for (var i = 0; i < Inputs.GetChildCount(); i++)
                {
                  child = Inputs.GetChild(i);
                   Outputs.AddChild(child.Copy());
                }
              }
              
            4. Configure integration objects as required.

              Some integration objects have been configured for this example. The “FINS Connector Factory" project in Oracle’s Siebel Tools includes all the integration objects.

            5. Configure data transformation maps as required.

              Two data transformation maps have been configured for this example. You can list them in Oracle’s Siebel Financial Services application with a query specification of “Credit Card*Add*" in the Comments field of the Integration Object Map screen.

            6. Configure workflows as required.

              Two workflows have been configured for this example: "Credit Card Application Inbound Workflow" and “Credit Card Application Outbound Workflow."