Get an overview

The basic structure of a Custom Function written using C programming language is shown in the following diagram:

Structure of a Custom Function written in C

Enveloping the code that performs the core processing code of the function are two layers that extract the values of the real parameters and generate the return value. These are necessary because of the use in integration engine of abstract containers for parameters.

Consider the IsLeapYear Custom Function which determines whether a supplied year is a leap year or not. The C prototype that matches the definition made previously is:

void IsLeapYear(xibrt_handle hCtx, xibrt_handle hValue,
                                     xibrt_handle hYear)

The first argument of a Custom Function is always hCtx, which should be passed without any change to all subsequent calls to the integration engine runtime services library. The remaining arguments are the function return value and defined parameters. Each of these is a handles on container that contain the values.

Related Links