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 integration server 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 one or
more of the following modifications:
- Modifications that are applied to the input root in the node
- Modifications that are made from a user exit during the preceding propagate callback
- Modifications that are made from a user exit during the downstream node complete callback if the node does not create a new message; for example, output nodes, Compute nodes with a Compute Mode that is set to LocalEnvironment, Exception, or Exception And LocalEnvironment, or request nodes with an Output data location that is set to LocalEnvironment.
The user exit code must not update transport headers or Properties elements in the message tree. Updating the message can affect performance. Changes that are made during this callback are visible only if the upstream node does not cause a new Message to be created.
- 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){
…
…
}