Testing a user-defined node

When you have created and installed the required resources, you can test your user-defined node.

Before you begin

Complete the following tasks:

This topic is for user-defined nodes created in Java and C only.

For user-defined nodes created from a subflow, see Testing a subflow user-defined node project.

Procedure

Use the following steps to test your user-defined node:

  1. To test these projects and resources you must launch a second IBM Integration Toolkit by using the following steps:
    1. Right-click the user-defined node project.
      The menu opens.
    2. Click Run in New Workbench.
      • If the project contains errors, you receive an error message that gives you the option to continue, or to cancel the action.
      • If the project is error-free, the Workspace Launcher window opens.
        1. You can choose to use a new or an existing workspace. To choose an existing workspace, click Browse. The second workspace opens.
        2. You can now test by using the user-defined nodes in all error-free user-defined node projects in your first workbench.
  2. Open the Message Flow editor in the second instance of the IBM Integration Toolkit.
    Your new nodes are displayed in the node palette.
  3. Create a message flow that includes your node.
  4. Deploy the message flow to an integration node.
  5. 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.
  6. Use the diagnostic tools that are provided to determine whether your node works, or if not, what went wrong:
    1. For a description of some common problems and their solutions.
    2. Write entries to the Administration log from your node.
    3. Switch on user trace at debug level.
      See Using trace.

      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 started. 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 starting the Java evaluate() method of a user-defined node.
      • BIP3905: A message traced before starting the C cniEvaluate() implementation function (iFpEvaluate member of CNI_VFT) of a user-defined node.
      • BIP4142: A debug message that is traced when starting a user-defined node utility function, where the utility function alters the state of a syntax element. All utility functions that start with cniSetElement*, where * represents all nodes with that stem, are included.
      • BIP4144 and BIP4145: A pair of messages traced by certain implementation functions that, when started by a user-defined extension, can modify the internal state of an object in the integration node. Possible integration node 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 starting a user-defined parser utility function, where the utility function alters the state of a syntax element. All utility functions that start with cpiSetElement*, where * represents all nodes with that stem, are included.
      • 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 an object in an integration node.
      • 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.
    4. Add a Trace node to your message flow, and check the output that is generated.
    5. Use the flow debugger to debug the flow that contains your node.

What to do next

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 and distributing a user-defined node project. Until you complete this task, the new nodes are available only in your test IBM Integration Toolkit session on your local system.