Testing a user-defined node

You must deploy the files that make up your user-defined node project to your workbench before your user-defined node is available for use. You can do this in a test environment by using the Plug-in Development Perspective in the workbenchStart of change, see Enabling PDE runtime capabilitiesEnd of change. Use the Run > Run as > Runtime Workbench option to start a new copy of the workbench with the extra nodes included. For more information on this perspective see PDE Guide.

You can see the new nodes in the palette when you open your Message Flow editor. To test your new node, add it to a message flow (see Adding a message flow node) and deploy as usual. When you are happy with your node definition, add the new node into your normal palette of nodes in the Message Flow editor (see Distributing a user-defined extension). Until you do this, the new nodes are available only in your test workbench session.

Start of changeWhen you have a workbench session that includes your new node, you can deploy a test message flow containing your new node to a broker. You must have created, compiled, and installed the plugin node first before you can deploy it. See Installing a user-defined extension on a broker domain for more information.End of change

When you have set up and deployed a message flow containing your user-defined node, and sent a test message to it, there are a number of diagnostic tools available for you to determine if your node works, or if not, what went wrong.
  1. Start of changeUse event logging. See Using event logging from a user-defined extension for more information.End of change
  2. Check the event log (see Event Log editor for information about this).
  3. Add a Trace node to your message flow, and check the output from it (see Trace node for information about Trace nodes).
  4. Use the flow debugger to debug the flow containing your node (see Testing and debugging message flow applications for information about this).
The following debug messages are available 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 situation:
    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.
See Resolving problems with user-defined extensions for a full list of implementation functions.

Switch on user trace at debug level in order to see these trace entries. See Using trace for more information.

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
Distributing a user-defined extension
Related reference
Event Log editor
Trace node
User-defined extensions