cciTransactionEventCallback

This is a function that can be registered as a callback and is invoked every time a message flow transaction ends. It is invoked for every message flow transaction within the execution group where the callback was registered, if the user exit state is active. The callback is registered by providing a pointer to the function in the iFpTransactionEventCallback field of the CCI_UE_VFT struct passed to cciRegisterUserExit.

Syntax

typedef void (*cciTransactionEventCallback) ( 
                                 CciDataContext*         userContext,
                                 CciTransactionEventType type,
                                 CciMessage*             environment,
                                 CciNode*                inputNode);

Parameters

userContext (input)
This is the value that was passed to the cciRegisterUserExit function.
type
This describes the event that occurred. Possible values are:
  • CCI_TRANSACTION_EVENT_COMMIT

    A transaction has been successfully committed.

  • CCI_TRANSACTION_EVENT_ROLLBACK

    A transaction has been rolled back.

If the transaction was rolled back due to an unhandled exception then that exception’s details can be obtained by calling cciGetLastExceptionData.
environment
This is a handle to the environment object for the current message flow. Although the user exit can update this tree, it is cleared after returning from this function, so any updates are lost.
inputNode
This is a handle to the input node which reads the input message that triggered the transaction. It can be used to make calls to functions such as cciGetNodeName, cciGetNodeType, and cniGetBrokerInfo.

Return values

None

Example

void myTransactionEventCallback(
                     CciDataContext*         userContext,
                     CciTransactionEventType type,
                     CciMessage*             environment,
                     CciNode*                inputNode){
…
…
}
Related concepts
Developing user exits
Related tasks
Developing a user exit