cciNodeCompletionCallback

The cciNodeCompletionCallback function can be registered as a callback and is called whenever a node has completed processing of a message and is returning control to its upstream node.

The cciNodeCompletionCallback function is called for every message that is propagated in 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 as the iFpNodeCompletionCallback field of the CCI_UE_VFT struct that is passed to cciRegisterUserExit.

If the node completes due to an unhandled exception, it returns with a reasonCode of CCI_EXCEPTION, and that exception’s details can be obtained by calling cciGetLastExceptionData.

If the node completes normally (including handling an exception on the catch or failure terminal), it returns with a reasonCode of CCI_SUCCESS. In this case, calling cciGetLastExceptionData returns unpredictable results.

Syntax

typedef void (*cciNodeCompletionCallback)   (
                                 CciDataContext* userContext,
                                 CciMessage*     message,
                                 CciMessage*     localEnvironment,
                                 CciMessage*     exceptionList,
                                 CciMessage*     environment,
                                 CciConnection*  connection,
                                 int             reasonCode);

Parameters

userContext (input)
The value that is passed to the cciRegisterUserExit function.
message
A handle to the current message object. The current message is the message that is propagated to the node plus modifications that are applied to input root in the node.
localEnvironment
A handle to the local environment object that is being propagated.
exceptionList
A handle to the exception list object that is being propagated.
environment
A handle to the environment object for the current message flow.
connection
A handle to the connection object between the two nodes. The handle can be used, for example, in calls to cciGetSourceNode, cciGetTargetNode, cciGetSourceTerminalName, and cciGetTargetTerminalName. This handle is valid only for the duration of this instance of the user exit function.
reasonCode
A reason code that indicates whether the node completes normally (CCI_SUCCESS) or the node completes as the result of an unhandled exception (CCI_EXCEPTION). If the node completes due to an unhandled exception, you can obtain that exception’s details by calling cciGetLastExceptionData. If the node completes normally (including handling an exception on the catch or failure terminal), the effect of calling cciGetLastExceptionData is undetermined.

Return values

None.

Example

void myNodeCompletionCallback(
                                 CciDataContext* userContext,
                                 CciMessage*     message,
                                 CciMessage*     localEnvironment,
                                 CciMessage*     exceptionList,
                                 CciMessage*     environment,
                                 CciConnection*  connection
                                 int             reasonCode){
…
…
}
Related concepts
User exits
Related tasks
Developing a user exit
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2009Copyright IBM Corporation 1999, 2009.
Last updated : 2009-01-07 15:23:20

as35940_