User exits

A user exit is user-provided custom software, written in C, to track data passing through message flows.

User-provided functions can be invoked at specific points during the life cycle of a message while it passes through the message flow, and can invoke utility functions to query information about the point in the flow, and the contents of the message assembly. The utility function can also modify certain parts of the message assembly. For more information about using user exits, see Why use a user exit?.

The user exits can be invoked when one or more of the following events occur:
  • The end of a unit-of-work (UOW) or transaction (COMMIT or ROLLBACK).
  • A message passes between two nodes.
  • A message is successfully enqueued or sent to a transport in an output, reply, or request node.
  • A message is dequeued or received in an input, response, or TimeoutNotification node.
Basic message flow
In the basic message flow shown here, you can track messages at three levels:
  • Transaction level
  • Node level
  • Input or output level
At the transaction level, you can track the following events:
  • Messages being read into the flow
  • Completion of the transaction
At the node level, you can track the following events:
  • A message passing from one node to another
  • Completion of processing for one node
At the message input or output level, you can track the following events:
  • Messages being read into the flow
  • Messages being written from the flow
Therefore, you can track five different types of event, which occur in the following sequence:
  1. A message is dequeued from the input source (read into the flow).
  2. A message is propagated to the node for processing.
  3. A request message is sent to the output node's transport, and transport-specific destination information is written to "WrittenDestination" in the LocalEnvironment.
  4. Node processing is completed.
  5. The transaction ends.