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:
- 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.
- Click to start a new copy
of the workbench that includes your new nodes.
- Open the Message Flow editor. Your new nodes appear
in the node palette.
- Create a message flow that includes your node. Read Adding a message flow node for guidance on how to complete this task.
- Deploy the message flow to a broker. This task is described
in Deploying a message flow application.
- 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.
- Use the diagnostic tools that are provided to determine whether
your node works, or if not, what went wrong:
- See Resolving problems with user-defined extensions for a description of
some common problems and their solutions.
- Check the event log. Details are provided in Event Log editor.
- Write entries to the event log from your node. See Using event logging from a user-defined extension for more information.
- 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:
- cniGetAttribute2 or cniGetAttributeName2 sets
the return code to CCI_BUFFER_TOO_SMALL.
- cniGetAttribute2 or cniGetAttributeName2 is
called again with the correct size buffer, however the return code is set
to CCI_BUFFER_TOO_SMALL.
- Add a Trace node to your message flow, and check the output
that is generated. See the Trace node for
further information.
- 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.