Debugging your OL Connect Workflow process

After designing a process, which is to add the different tasks, branches and conditions to the process and configuring them (see About processes and subprocesses), you can test whether or not the process and configuration actually work.

Once you have created and fully debugged all your processes, you will be ready to send it to OL Connect Workflow service. See Saving and sending a Workflow Configuration.

Prerequisites

Before you can start debugging, these are the prerequisites.

Note: The sample job file should generally be the exact same format as the data that the process will receive when OL Connect Workflow is processing the job at run-time.

About the Debug mode

When debugging your process, it is important to keep in mind that:

  • The initial Input task is never executed. The sample data file is used instead of the initial run. This is to prevent "live" data from being retrieved by the initial input task while debugging is being done. If, however, the initial task is critical to the process, it can be executed by copying the initial input task and pasting it as a secondary input task (the first Action task to actually run in the process). Do not forget, however, to remove this duplicate task before saving the configuration!
  • If any task makes an operation on the system (for example, capturing files, sending data, printing, etc), it is actually executed, not simulated.
  • Any task is executed with the permissions of the user that is currently running the OL Connect Workflow Configuration tool. When running in Service mode, the user configured in the Configure Services dialog is used instead. If the credentials are different, a job that runs in debug mode may fail at run-time if the permissions are not available to the Service. Please see Workflow Services for more details.

Running in Debug mode

Debugging can be run in different ways:

  • From the Debug tab, click on Run. This executes the complete process, step by step, until it is completed.
  • From the Debug tab, click on Step. This executes only the first task in the process and waits for further action. While stepping through a process (using Step, not Run), breakpoints may be used and given steps may be passed, using the buttons on the Debug ribbon (see below).
  • Right-click on any task in the process and click Run from Here or Step from Here. These actions are the same as using the debug Step and Run buttons, but will execute the process only starting from that task forward.

Double-click on any task to change its properties. If you change the properties of a task before you step through it, those new properties will be used when the task is executed. Note that you cannot modify the process itself while in debug mode (you cannot add, delete or move tasks, change branches and conditions, etc).

Look at the Messages Area pane to see any message generated by the tasks that run (See The Message Area Pane).

Use the Debug Information pane to see the current value of any variable in your process or globally, or to evaluate custom expression. See The Debug Information pane.

Use the Object Inspector - one of the panes alongside the Debug Information pane - on the process to enter sample job information as required.

The Debug ribbon provides the following buttons:

  • Click on Skip to ignore the next task or branch and go to the subsequent one. The job file is not modified in any way.
  • Click on View as Text in the Data group of the Debug tab to view the current job file using a text editor (Notepad by default).
  • Click on View as PDF to view the current job file in Adobe Acrobat if it is present (this will work only for PDF job files).

    Tip: Press the Page up/Page down key to scroll through the PDF.

  • Click on View Metadata to open the data selector and see the current state of the process' Metadata.
  • Click on View as Hex to view the current job file in the internal Hex editor.
  • Click on the Stop button to stop the debugging process. If you use Run, Step or Skip after stopping the process, debugging starts over from the top.
  • Use the Set Breakpoint button to tag the currently selected task, branch or condition as a breakpoint. When you click Run in your process, the process will execute every task until it reaches a breakpoint and will stop just before the task that is set as a breakpoint.
  • Use the Ignore button to disable the task, branch or condition that is currently selected. If you disable a branch or condition, all tasks inside that branch or condition are ignored including the output. Note that if you set a task, branch or condition to be ignored, it will also be ignored at run-time, providing you sent the configuration to the service.

Debugging and Emulation changes

One of the cases where debugging is most useful is whenever the job file is converted to another type of emulation, or if a new data file of a different emulation is used somewhere in the process. For example, if a process starts with a Line Printer data file and then converts it into a PDF, it is not possible to select anything from the PDF to be used as (variable) task property, because the Line Printer emulation is active by default. The debugging features can easily resolve this limitation.

The first method is used if your process has all the required tasks, but data selections after an emulation change are necessary.

  • Step through the process until you have reached the point after the emulation or data change.
  • Make the necessary data selections (see Data selections). Any data selection used in task properties after this point will use the new emulation.
  • Continue stepping through each task until the end of the process to debug it.

This method does not allow you to add, remove or move tasks, however.
The second method can be used when that is required.

  • Step through the process in Debug mode until you reach the emulation or data change.
  • Click on View as Text (or View as PDF if your data is PDF at this point) in the Data group of the Debug tab.
  • In the viewer that appears, save the file to a location on your hard drive.
  • Stop the process, and select the file you saved as your process's sample data file (see Choosing a sample data file).
  • If you need to continue debugging your process after the emulation change, you can still do it by using Skip on all the tasks until the emulation change, inclusively. Then use Step or Run to continue debugging.

Lastly, OL Connect Workflow has an option that can be used in conjunction with the previous to avoid skipping through large processes:

  • Step through the process until the emulation or data change, as in the first method.
  • Save the data file locally and then select it as your sample data file, as with the second method.
  • Instead of skipping through each task, use the Run from here or Step from here options, either from the Debug tab or by right-clicking on the task where you want to start the process.