TESTING TELEFLOW APPLICATIONS - UNDERSTANDING THE TELEFLOW SIMULATOR LOG
If you run the simple application described in the previous post, as suggested in step#19, you will see how TeleFlow Simulator works.
To be able to use TeleFlow Simulator to test and debug your applications requires a solid understanding of TeleFlow Log output. TeleFlow log output in the Simulator is the same as for the server, so you can safely assume that anything you learn in one applies to the other.
What follows is a clip of TeleFlow Simulator log output from a simple, three-step demonstration application.
Code:
Initialization done
2007/12/19 16:00:20.255: ==>Main
2007/12/19 16:00:20.255: [1] START
2007/12/19 16:00:20.255: [25] Wait for Call
2007/12/19 16:00:20.255: TIMEOUT is ''
2007/12/19 16:00:20.255: Empty TIMEOUT defaults to none
2007/12/19 16:00:20.255: Rings is '2'
2007/12/19 16:00:20.271: Connection Delay is '500'
2007/12/19 16:00:21.771: Wait for 2 rings and then pickup
2007/12/19 16:00:29.989: Setting global variable '@CALLER_ID' to ''
2007/12/19 16:00:30.005: Connection delay: 500 ms
2007/12/19 16:00:30.536: [27] Play
2007/12/19 16:00:30.552: Script code is 'HELLO'
2007/12/19 16:00:30.583: Script code 'HELLO' corresponds to file 'Vox\Eng\Scripts\HELLO.wav'
2007/12/19 16:00:30.614: Playing 'C:\DemoFiles\Vox\Eng\Scripts\HELLO.wav'
2007/12/19 16:00:33.271: [29] Hang Up
2007/12/19 16:00:33.286: Hanging up
2007/12/19 16:00:33.317: [2] FINISH
2007/12/19 16:00:33.349: End of application.
2007/12/19 16:00:36.395:
2007/12/19 16:00:36.474: All memory released. Exiting...
What it all means
What follows are some specific pieces clipped from the log above, and a description of what they mean.
2007/12/19 16:00:20.255: Indicates the date and time (to milliseconds precision) that the event on the line occurred. Every line/segment of log data has a date/time stamp to help you see how long things take, and when they happened. The format of this date/time stamp is: YYYY/MM/DD HH:MM:SS.nnn.
==>Main: Indicates the application is entering a flowchart named "Main".
[1] START: Indicates a START step is being run. The square bracket is the step number, which is unique to the flowchart. Any log line that starts with a square bracketed number is the start of a step being processed. The lines that follow describe the actions taken by the step.
- If you want to find a particular step in a TeleFlow Application based on something you see in a log, determine which flowchart the step output is for (by following the log until you see the arrow(==>) indicating a flowchart is being run), then use the step number to search for the step. (In TeleFlow Designer, go to the appropriate flowchart, right-click some empty flowchart space, and select the "Go to Step#..." option. Then, type in the step number you found in the log, and click "Ok". TeleFlow Designer will jump to and select the step.)
Main<==SomeOtherFlowchart: Not demonstrated in the log output above. This would indicate that a flowchart named "SomeOtherFlowchart" had completed, and that the application flow was returning to Main
Searching the log for errors
If an application should encounter an error - in Simulator, this is indicated by a red light, and a status message of "Terminated abnormally" - you will need to search through the log to find it. There are two things to note about this:
1) Searching for a particular event in a TeleFlow log is usually easiest if you search from the bottom/end up. The end of the log is closer to the error than the beginning (usually), and is also where you will find the most recent or last steps run before and after the error occurred.
2) To locate the exact point an error occurred: Copy and paste the contents of the entire Simulator log output to a text editor that has a search feature (Eg. Notepad). Search for this string to locate the point at which TeleFlow determined there was an error: "jump to fatal"