IBM Support

Quick instructions for RIT Custom Function in Eclipse

Question & Answer


Question

Is there a summary of how to create Custom Functions for IBM Rational Integration Tester (RIT)?

Cause

A user who has constructed a Custom Function previously for RIT may wish to repeat the process without working through all the instructions in the manual again. The document may also assist users reviewing the process undertaken when troubleshooting.

Answer

    These are summary instructions from detailed instructions in the manual. They are intended only as a reminder for users who have already read the manual, and who know Java and Eclipse.

Steps to undertake once (creating Eclipse Project, configuring Eclipse)
    In a suitable Eclipse select "New" > "Project" > "Plug-in Development" , "Plug-in - Project"
    • Name the project with full package name e.g. com.companyname.customfuncs
    • Set version no. and Java execution environment; Clear "generate activator"
    • Do not select "use a template". Do not change the perspective.

    Unless your eclipse is already configured, then
    • Windows > Preferences > Plug-in Development > Target Platform
    • Add "C:\Program Files\IBM\Rational Integration Tester" and
    • Add "C:\Program Files (x86)\IBM\IMShared"
    (These settings should be sufficient for any version of RIT - you many not need both settings.)

      Note: GH Tester users should just add "C:\Program Files\GreenHat\GH Tester" instead.

    The MANIFEST.MF editor will open.
    • In dependencies, on the right hand side (under "Imported Packages") add "com.ghc.ghTester.expressions"
    • SAVE THE MANIFEST FILE (Otherwise the Plug-in dependencies will be unavailable).


    Steps to undertake for each new Custom Function


    Create a class (in a package with the same name as the project) and write your code.
    • You may wish to copy and paste the body of the attached template below.
    • Ensure you change (from the template)
      • The package name, and
      • The three instances of "MyFunction"
    • Note: CTRL+A and then CTRL+I will auto-indent the pasted text in Eclipse.

    In MANIFEST.MF go to the Extensions tab
    • add a New Extension based on "com.ghc.ghTester.functions" if it does not exist, or add an entry to the existing one if it is already present, and set:
      • name = name as shown in RIT function call
      • displayName = name as shown in RIT menu
      • syntax = template which appears when function chosen from menu
      • functionClass = com.companyname.customfuncs.myFunction
      • Set the minParameters and maxParameters (do not leave these blank)
    • SAVE THE MANIFEST FILE

    Right click the project and select export
    • Plug-in Development > Deployable plug-ins and fragments
    • Export to Functions\ sub-folder of RIT project (a further "plugins" sub-folder will be generated).
    • In RIT select menu option: "Tools" > "Functions" > "Reload Custom Functions"

    These instructions are also suitable for GH Tester, the forerunner of IBM Rational Integration Tester.


    Sample Code Template
     DISCLAIMER:

    All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

    [{"Product":{"code":"SSBLQQ","label":"IBM Rational Test Workbench"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Rational Integration Tester","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF022","label":"OS X"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"8.0;8.5;8.6","Edition":"All Editions","Line of Business":{"code":"LOB45","label":"Automation"}}]

    Document Information

    Modified date:
    11 July 2019

    UID

    swg21654482