Testing and troubleshooting message flows

You can test your message flows in a development environment to identify issues before you deploy them to a production environment, and you can use Trace nodes to help you troubleshoot a message flow after it has been deployed. You can also create unit tests for your message flows and message flow nodes, and you can run these tests either during development or after the message flows have been deployed.

Before you begin

You must have a basic understanding of message flows and their representation in the IBM® App Connect Enterprise Toolkit. See Message flows overview.

About this task

You can test and troubleshoot your message flows by using the following methods:
Use the Flow Exerciser

You can use the Flow Exerciser to deploy your message flow and then create and send messages to the flow. After the messages are processed, the paths that the messages took are highlighted. You can then view the structure and content of the logical message tree on any highlighted connection in the message flow. See Testing your message flow by using the Flow Exerciser. You might use the Flow Exerciser when you want to check the operation of a message flow.

Develop unit tests for your message flows
You can create and run unit tests to validate the operation of your App Connect Enterprise flows and message flow nodes. You can create and run the tests for flows and nodes that you are developing or for flows that have already been deployed. For more information, see Developing integration tests.
Use the Flow debugger
You can use the Flow debugger to track messages through your message flow in real time. You can set breakpoints in a message flow, then step through the flow. While you are stepping through, you can examine and change the message variables and the variables used by ESQL code and Java™ code. See Testing your message flow by using the flow debugger. You might use the Flow debugger when you know that there is a problem with a message flow and you want to troubleshoot the problem.
Note: It is not possible to use the Flow debugger with the Flow Exerciser. When you use the Flow debugger, you must use a third-party tool or the Test Client to send a message to the flow; see Test Client.
Enable user trace

You can enable user trace to show the history of processing that is carried out in a particular message flow. Built-in nodes write messages to user trace when they are processing work. You can use these messages to review the activity in a message flow and show information such as which message flow nodes were invoked, what code the nodes ran, and through which terminals the messages were sent. See Testing your message flow by enabling user trace.

Use Trace nodes

You can use Trace nodes to write out your own debugging information at specific points in the message flow. The debugging information is written to a file, to user trace, or to the system log. You can review the information after the message flow processes one or more messages. See Testing your message flow by adding Trace nodes. You might add Trace nodes to your message flow during development so that, when your flow is deployed in production, you can get additional information if you use user trace to troubleshoot your flow.

Enable exception log
You can enable the exception log to record data relating to issues and errors in your message flows. See Enabling the exception log.