Creating Custom XPath Functions

Procedure

  1. Run TIBCO Business Studio from the Start menu. For example, select Start > All Programs > TIBCO_Home > TIBCO Business Studio N.N > Studio for Designers
  2. Select File > New > Project ....
  3. In the New Project dialog under Plug-in Development, select Plug-in Project and click Next.
  4. Specify a name for the project that reflects the XPath functions (for example, My Custom Functions).
    Accept all other defaults and click Next.
  5. On the Plug-in Content page, locate the Plug-in Options group, and clear these options:
    • Generate an activator, a Java class that controls the life cycle of the plug-in.
    • This plug-in will make contributions to the UI.
  6. Accept all other defaults, and click Next.
  7. In the Templates page, select Custom XPath Function Wizard and click Next.
  8. In the Custom XPath Function Group dialog box, provide values:
    • Category: This is the name of the category that will include the custom XPath function.
    • Prefix: The prefix for the functions
    • Namespace: The namespace for the functions.
    • Help Text: The description of the functions.
  9. Click Next to continue.
    The XPath Function Group Creation Section dialog is displayed. Here you specify the function and function parameters.
  10. Click the Add button located on the right side of the XPath Function table and provide values.
    • Name: The name of the function.
    • Return Type: The return type of the function.
    • Description: The description of the function.
  11. Click the Add button located on the right side of the XPath Function Parameters table.
    • Name: The name of the parameter.
    • Type: The data type of the parameter.
    • Optional: Select the check box if the parameter is optional.
  12. Click Finish.
  13. TIBCO Business Studio opens the Open Associated Perspective dialog, which asks if you want to open the Plug-in Development perspective.
    • Optionally, select the check box Remember my decision. Click Yes.

      TIBCO Business Studio opens the custom XPath function plug-in and the Plug-in Development perspective.

Result

Along with the custom XPath plug-in, a SOA Project < plug-in project name>.deploy.soa is created.

Your custom code is written in < plug-in project name>\src\<plug-in project name>\<category name>.java.