Community articleregisterFunctionCall method
Added by IBM contributorIBM on July 26, 2013
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars


Registers your custom function with the Function Call Manager.


public void registerFunctionCall(
   com.PureEdge.xfdl.FunctionCall theFCIInterface, 
   String thePackageName,
   String theFunctionName,
   int theFunctionID,
   int theFlags,
   String theCallingParams,
   int theVersion,
   String theQuickDesc
  ) throws UWIException;


theFCIInterfaceFunctionCallThe FunctionCall object that will handle requests for the function. Setting: The FunctionCall object that is registering the function. See Notes for more information.
thePackageNameStringThe name of the package that will contain the function.
theFunctionNameStringThe name of the function.
theFunctionIDintA unique number that can be used to identify the function. See Notes for more information.
theFlagsintA set of flags which indicate how the custom function will be evaluated. Setting: Typically FCI_FOLLOWS_STRICT_CALLING_PARAMETERS or 0. See Notes for more information.
theCallingParamsString The list of parameters that this function takes. Setting: S, O, or R. See Notes for more information.
theVersionintThe version number of the function. Setting: Function Version Number. See Defining a Version Number for more information.
theQuickDesc StringA short, one-line description of what the function does.


Nothing if call is successful or throws a generic exception (UWIException) if an error occurs.


  • theFCIInterface — Typically a FunctionCall object will register its own function with the Function Call Manager. Use the keyword this to represent the current object.
  • theFunctionID — Each function that you create as part of a particular package must have a unique identification number. Define each function's ID number as a constant at the beginning of the class. For example, the multiply function has an ID number of 1:
  •    public static final int MULTIPLY_ID = 1;

  • theCallingParams — List the type of each parameter that the function will take and separate each value with a comma.
    • Use S to indicate a string parameter.
    • If the parameter is optional, then an O is added after the S.
    • If the parameter can repeat, then an R is added after the S.
    • For example, if you were to register a function that had to have one parameter and optionally a second parameter then the theCallingParams would look like the following:
    •    "S,SO"

    • If there are no parameters, use an empty string ("").

Defining a Version Number

  • If multiple FunctionCall objects register the same function for the same package, then the function with the highest version number is used.
  • Version numbers are defined in hexadecimal format as follows, where the 0300 is a constant and must be present :
  • 0x<major><minor><0300>
  • For example, a function that is version 2.1 would be represented as
  • 0x02010300
  • Define a function's version number in the parameter theVersion.
Note: For more information about using version numbers refer to page.


   public class FciFunctionCall extends com.PureEdge.xfdl.FunctionCallImplBase 
   implements FunctionCall
   public static final int FUNCTION_ID = 1;
      /* Additional Code Removed */
         "Multiplies two numbers");