WebSphere Message Brokers
File: as04505_
Writer: Lorraine Waitt

Task topic

This build: July 31, 2007 21:37:05

Testing a user-defined node

Before you start

Ensure that you have completed the following tasks:

When you have created and installed the required resources, you can test your user-defined node:
  1. Enable the Eclipse Plug-in Development environment. This task is described in Enabling PDE runtime capabilities. For more information about the PDE and the Plug-in Development Perspective, see the PDE Guide.
  2. Click Run > Run as > Runtime Workbench to start a new copy of the workbench that includes your new nodes.
  3. Open the Message Flow editor. Your new nodes appear in the node palette.
  4. Create a message flow that includes your node. Read Adding a message flow node for guidance on how to complete this task.
  5. Deploy the message flow to a broker. This task is described in Deploying a message flow application.
  6. Send a test message through the flow and look for the results that you expect (for example, a message put to a target queue). You might have to write an application to send the test message to the message flow.
  7. Use the diagnostic tools that are provided to determine whether your node works, or if not, what went wrong:
    1. See Resolving problems with user-defined extensions for a description of some common problems and their solutions.
    2. Check the event log. Details are provided in Event Log editor.
    3. Write entries to the event log from your node. See Using event logging from a user-defined extension for more information.
    4. Switch on user trace at debug level. See Using trace for details of how to complete this task.

      The following debug messages are generated by a user trace to help you to understand the execution of your user-defined nodes and parsers:

      • BIP2233 and BIP2234: a pair of messages traced before and after a user-defined extension implementation function is invoked. These messages report the input parameters and the returned value.

        In these messages, an "implementation function" can be interpreted as either a C implementation function or a Java implementation method.

      • BIP3904: a message traced before invoking the Java evaluate() method of a user-defined node.
      • BIP3905: a message traced before invoking the C cniEvaluate() implementation function (iFpEvaluate member of CNI_VFT) of a user-defined node.
      • BIP4142: a debug message that is traced when invoking a user-defined node utility function, where the utility function alters the state of a syntax element. This includes all utility functions that start with cniSetElement*, where * represents all nodes with that stem.
      • BIP4144 and BIP4145: a pair of messages traced by certain implementation functions that, when invoked by a user-defined extension, can modify the internal state of a message broker's object. Possible message broker objects include syntax element, node, and parser.

        In these messages, an "implementation function" can be interpreted as either a C implementation function or a Java implementation method.

      • BIP4146: a debug message that is traced when invoking a user-defined parser utility function, where the utility function alters the state of a syntax element. This includes all utility functions that start with cpiSetElement*, where * represents all nodes with that stem.

        For information on the C language user-defined node API, see the C language user-defined parser API and the C language user-defined node API.

      • BIP4147: an error message that is traced when a user-defined extension passes an invalid input object to a user-defined extension utility API function.
      • BIP4148: an error message that is traced when a user-defined extension damages a broker's object.
      • BIP4149: an error message that is traced when a user-defined extension passes an invalid input data pointer to a user-defined extension utility API function.
      • BIP4150: an error message that is traced when a user-defined extension passes invalid input data to a user-defined extension utility API function.
      • BIP4151: a debug message that is traced when cniGetAttribute2 or cniGetAttributeName2 sets the return code to an unexpected value. Expected values are CCI_SUCCESS, CCI_ATTRIBUTE_UNKNOWN, and CCI_BUFFER_TOO_SMALL. Any other value is an unexpected value.
      • BIP4152: a debug message that is traced in the following situations:
        1. cniGetAttribute2 or cniGetAttributeName2 sets the return code to CCI_BUFFER_TOO_SMALL.
        2. cniGetAttribute2 or cniGetAttributeName2 is called again with the correct size buffer, however the return code is set to CCI_BUFFER_TOO_SMALL.
    5. Add a Trace node to your message flow, and check the output that is generated. See the Trace node for further information.
    6. Use the flow debugger to debug the flow that contains your node. Start with Testing and debugging message flow applications.

When your node behavior is complete and correct, add the new node into your normal palette of nodes in the Message Flow editor (see Packaging a user-defined node workbench project). Until you do this, the new nodes are available only in your test workbench session on your local system.

Related concepts
User-defined input nodes
User-defined message processing nodes
User-defined output nodes
Related tasks
Developing user-defined extensions
Adding a message flow node
Testing and debugging message flow applications
Resolving problems with user-defined extensions
Packaging a user-defined node workbench project
Related reference
Event Log editor
Trace node
User-defined extensions
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:37:05

as04505_ This topic's URL is: