Chapter 8. Errors, Logs, and Debug Mode

In the last few chapters, we learned how to build new workflows and improve them. What we haven't covered yet is how we can catch errors and deal with them. By using presentation properties, we have already learned how to reduce the amount of errors by introducing a method that can be used to limit the user's possibilities to enter wrong values. Now, we need to have a look at how we deal with "real" errors, such as what happens if the new VM can't be built because there isn't enough disk space on the datastore.

Logs help us keep track of what's happening in the workflow as well as the settings.

We will also have a look at the debug modus of Orchestrator and learn how we can use it to test our workflows.

The debug mode

Lets' start with the Orchestrator debug mode; you may have noticed that the schema has some interesting extra buttons next to the validation. There is a play button and one that looks like a bug. We will now focus our attention on this second icon.

The Orchestrator debug mode allows you to stop and resume a workflow execution, and inspect the parameters to see the values that they currently have. You can already imagine what a great help this is.

  1. In the Orchestrator Client, open the InstallFreshVM workflow for editing.
  2. Right-click on the first element in the workflow (it should be the translateOS2GuestOS) and select Toggle Breakpoint. A blue dot should now be seen to the left of the element.
  3. Now, click on Debug, The debug mode.
  4. The normal workflow input window will open. Select the values and submit it.
  5. As soon as you submit it, the workflow will start and pause on the first element. The element is now greenish in color.
  6. To the right, an extra window opens and shows all the parameters in the Variables tab.
  7. Please note that vmGuestOS is currently empty, as it shows Not set. This indicates that the workflow execution stopped before the action was executed.
  8. Now, we want to continue the execution of the workflow step by step. Click on Step intoThe debug mode, or press F5.
    The debug mode
  9. The workflow executes the action and stops on the scriptable task, but it does not execute it. Check the vmGuestOS parameter.
  10. You can now go ahead and click on Step into or press F5 until the workflow has finished. Alternatively, you can just click on Resume, The debug mode, to finish it.

The following control functions are used to debug:

Icon

Name

Key

Description

The debug mode

Cancel

 

This stops a workflow execution.

The debug mode

Answer

 

This answers a user interaction which the workflow issued.

The debug mode

Resume

 

This resumes the workflow until the next breakpoint.

The debug mode

Step into

F5

This steps into an element and starts debugging inside the child element. This can also be used to go to the next element.

The debug mode

Step over

F6

This will step over an element. The debugging will not enter the child element.

The debug mode

Step return

F7

This steps out of a child element. The debugging will continue with the parent element.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset