cciPropagatedMessageCallback

The cciPropagatedMessageCallback function can be registered as a callback and is called whenever a message is propagated from one node to another.

The cciPropagatedMessageCallback 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 iFpPropagatedMessageCallback field of the CCI_UE_VFT struct that is passed to cciRegisterUserExit.

Syntax

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

Parameters

userContext (input)
The value that is passed to the cciRegisterUserExit function.
message
A handle to the message object that is being propagated. The user exit code must not update this tree.
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.

Return values

None.

Example

void myPropagatedMessageCallback(
                        CciMessage*    message,
                        CciMessage*    localEnvironment,
                        CciMessage*    exceptionList,
                        CciMessage*    environment,
                        CciConnection* connection){
 

   int rc = CCI_SUCCESS;
   CciNode* targetNode = cciGetTargetNode(amp rc,
                                          connection);

 

   CciChar targetNodeName [initialStringBufferLength];
   targetNodeNameLength = cciGetNodeName(amp rc,
                                         targetNode,
                                         targetNodeName,
                                         initialStringBufferLength);
   /*you should now check the rc for unexpected values*/
   /*if rc is CCI_BUFFER_TOO_SMALL then you should resize and retry*/

}
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

as35930_