Debugging your PlanetPress Suite Process
Debugging a process is separated in two parts. The first part is designing the process, which is to add the different tasks, branches and conditions to the process and configuring them. The second step is testing whether or not the process and configuration actually work.
Before debugging begins, the following prerequisites must be completed:
- There must not be any Unknown Tasks in the process.
- A sample data file must be selected. To choose a sample data file, click the Select button in the PlanetPress Suite Ribbon's Debug tab and browse to a valid sample data file. Alternatively, if a document present in the configuration contains the necessary data file, it can be attached to the process easily. See Use Data and Metadata Files Attached to Documents.
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!
- Since the initial input task is not performed, there is no actual job information to be added at the beginning of a data file. Note that you can use the Object Inspector on your process to enter sample job information as required.
- 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 PlanetPress Suite Workflow Configuration Tool. When running in service mode, the user configured in the Configure Services dialog is used instead and this may lead to unexpected behaviors. Please seePlanetPress Workflow Service Logon for more details.
The sample job file should generally be the exact same format as the data that you will receive when PlanetPress Workflow is processing the job at runtime. For more information on how to capture your sample data file properly, please refer to the PlanetPress Trigger and Data Capture Guide.
Debugging can be run in different ways:
- From the Debug tab, click on Step. This executes only the first task in the process and waits for further action.
- From the Debug tab, click on Run. This executes the complete process, step by step, until it is completed.
- 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.
While stepping through a process (using Step, not Run):
- 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).
- Click on Skip to ignore the next task or branch and go to the next 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).
- 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 runtime, providing you sent the configuration to the service.
- 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.
Debugging and Emulation changes
One of the most useful case where debuggging is crucial is whenever the job file is converted to another type of emulation, or if a new data file of a different emulation is used within the process. For example, if a process starts with a Line Printer data file and the converts it into a PDF, it is not possible to do any data selection on the PDF 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.
- 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' 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, PlanetPress Suite 7.4 and higher also has a new 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.
Once you have created and fully debugged all your processes, you will be ready to send it to PlanetPress Workflow service. See Saving and Sending a Configuration.