You can develop a user exit by declaring it, implementing
its behavior, and then compiling it.
About this task
A user exit is user-provided custom software, which is written in C, which can be used to track
data that passes through message flows. For an example of how you might implement a user exit, see
Transaction tracking user exit sample.
Procedure
To develop a user exit, complete the following steps:
- Declare the user exit.
Declare a user exit
by using the bipInitializeUserExits function to
specify the following properties:
- Name (used to register and control the active state
of the exit)
- User context storage
- A function to be invoked (for one or more Event Types)
- Implement the user exit behavior.
When the user exit is declared, a set of functions is registered, and these functions are invoked
when specific events occur. The behavior of the user exit is provided by implementing these
functions. The following table lists the events and their associated functions:
| Event |
Function |
| A message is dequeued from the input source. |
cciInputMessageCallback |
| A message is propagated to the node for processing. |
cciPropagatedMessageCallback |
| A request message is sent to the output node's transport, and
transport-specific destination information is written to "WrittenDestination" in the
LocalEnvironment. |
cciOutputMessageCallback |
| The node completes processing. |
cciNodeCompletionCallback |
| The transaction ends |
cciTransactionEventCallback |
- Your user exit code must implement the cleanup function.
The user exit library must implement the bipTerminateUserExits function. This
function is invoked as the integration server's process is ending, and your user exit must clear up
any resources that are allocated during the bipInitializeUserExits function.
- Compile.
- Link the compiled code to a library with the
extension .lel that exports the bipInitializeUserExits and bipTerminateUserExits functions.
What to do next
Deploy the user exit by following the instructions in Deploying a user exit.