Table of Contents

Search

  1. Preface
  2. Introduction to Data Transformation
  3. Data Processor Transformation
  4. Wizard Input and Output Formats
  5. Relational Input and Output
  6. XMap
  7. Libraries
  8. Schema Object
  9. Command Line Interface
  10. Scripts
  11. Parsers
  12. Script Ports
  13. Document Processors
  14. Formats
  15. Data Holders
  16. Anchors
  17. Transformers
  18. Actions
  19. Serializers
  20. Mappers
  21. Locators, Keys, and Indexing
  22. Streamers
  23. Validators, Notifications, and Failure Handling
  24. Validation Rules
  25. Custom Script Components

Data Transformation User Guide

Data Transformation User Guide

Configuring a Custom Component

Configuring a Custom Component

After you develop a custom component, you must prepare a Script file that defines the component. You cannot prepare the TGP file in the IntelliScript editor. Instead, you must prepare it in a text editor.
After you install the component and the TGP file, you can configure the custom component in the IntelliScript editor.
  1. Create a text file and save it with a
    *.tgp
    extension.
    You can define more than one external component in a single TGP file.
  2. For each property that your external component supports, add lines such as the following to the TGP file:
    profile <CustomPropertyName1> ofPT <DataType> { paramName = "<CustomPropertyName1>" ; }
    <CustomPropertyName1>
    is the name of a property that you want to display in the IntelliScript editor.
    <DataType>
    is the data type of the property. The supported data types are
    NamedParamIntT
    for an integer property,
    NamedParamBoolT
    for a boolean property,
    NamedParamStringT
    for a string property, or
    NamedParamListT
    for a property that is a list of strings.
  3. For each external component that you wish to define, add lines such as the following to the TGP file. For a Java component:
    profile <ExternalComponentName> ofPT <ComponentType> { jclass = "<ClassName>" ; param1 = <CustomPropertyName1>() ; param2 = <CustomPropertyName2>() ; }
    For a C or C++ component:
    profile <ExternalComponentName> ofPT <ComponentType> { import_dll = DllPath("<DllName>") ; param1 = <CustomPropertyName1>() ; param2 = <CustomPropertyName2>() ; }
    <ExternalComponentName>
    is the name of the external component that you want to display in the IntelliScript editor.
    <ComponentType>
    is one of the following values:
    For
    ComponentType
    A Java document processor with 0 to 4 properties
    ExternalJavaProcessorNoParamsT ExternalJavaProcessor1ParamsT ExternalJavaProcessor2ParamsT ...
    A C or C++ document processor with 0 to 5 properties
    ExternalProcessorNoParamsT ExternalProcessor1ParamsT ExternalProcessor2ParamsT ...
    A Java transformer with 0 to 10 properties
    ExternalJavaTransformerNoParamsT ExternalJavaTransformer1ParamsT ExternalJavaTransformer2ParamsT ...
    A C or C++ transformer with 0 to 10 properties
    ExternalTransformerNoParamsT ExternalTransformer1ParamsT ExternalTransformer2ParamsT ...
    <ClassName>
    is the fully qualified name of the Java class. On Windows,
    <DllName>
    is the name of the DLL, without the
    *.dll
    extension. On Linux or UNIX, it is the name of the shared object, without the
    lib
    prefix or the
    *.so
    , extension.
    <CustomPropertyName1>
    and
    <CustomPropertyName2>
    are the names of the properties that you configured in step 2.
  4. Save the
    *.tgp
    file.
  5. Store the file in the
    DataTransformation\autoInclude\user
    subdirectory of the installation directory of every computer where you want to use the component.
  6. If the Developer tool is open, close it and re-open it.
  7. If an
    autoInclude
    error is displayed, review the TGP file for syntax errors or naming inconsistencies, and open the Developer tool again.
  8. Open a project and insert the custom component in the Script. The custom component name, which you assigned in step 3 above, appears in the IntelliScript drop-down list. The IntelliScript editor displays its properties.


Updated September 26, 2018