Testing Tasks Using Run Options

 

Task execution may happen so rapidly that it is difficult for a user to determine the exact cause of a problematic step. In such cases, the Task Builder encompasses various Run options (displayed below) to handle this issue. The Run Selected control runs only the selected steps, which is a useful way to ignore execution of steps that are non-problematic. The Run From Here control runs the task from the selected step onward. The Step control suspends task execution on a step by step basis, allowing you to examine what the task is doing during execution of each step. This is ideal for  troubleshooting problematic  purposes because it lets you suspend execution at each step as well as view runtime information populated within the various Debug panel views.

NOTE: When suspended, the task is still running but paused between actions. Automate variables or datasets retain their values, and the Task Builder's Output panel displays information about the step that is currently running.

Run Controls

The following table describes the Task Builder's list of available Run controls along with their associated icon and equivalent hot-key.

Icon

Name

Description

Hot-key

Run/Run All

Runs the entire task, from beginning to end, or until an error is encountered, a breakpoint is reached, or the Pause button is manually clicked. If the task is manually paused or a breakpoint is encountered, execution is suspended indefinitely at the point of the pause or breakpoint. Use other available run options described below to continue execution.

F5

Run Selected

Runs only the selected (highlighted) steps sequentially, from the lowest to the highest step. To select multiple steps, hold down CTRL during selection.

CTRL + F5

Run from Here

Runs the task from the selected (highlighted) step until its completion, or until an error is encountered, a breakpoint is reached, or the Pause button is manually clicked.

SHIFT + CTRL + F5

Step

Runs the task step by step, pausing after each step to allow enough time to examine the information displayed in the Debug panel. To continue to the next step, click Step or press F9. To run the remaining steps at normal speed, click Continue or Run from Here.

NOTES

  • Stepping can also be used to step through a task from a breakpoint or paused step.
  • When execution is paused, task state is suspended, however, functions, variables, and other debugging elements remain in memory. In order to fully stop task execution and reset debugging elements, click Stop or press CTRL+F2.

F9

Continue

Continues execution of a paused task from the point of suspension until its completion, or until an error is encountered, a breakpoint is reached, or the Pause button is manually clicked.

F5

Pause

Immediately and indefinitely suspends task execution at a particular step. Click Continue to resume execution or click Step to run remaining steps one by one.

F6

Stop

Immediately stops the running task and resets all debugging elements.

CTRL + F2

 

Run Instructions

To run the entire task:

  • Click the Run All button or press F5. This will run all of the steps of the task sequentially from beginning to end (or until an error is encountered, a pause is manually applied, or a breakpoint is reached).

To run one or more selected steps:

  1. Select the steps you wish to run from the Steps panel. To select more than one step, hold down CTRL during selection.

  2. Click Run Selected or press CTRL+F5. This will run the specified steps in sequence from the lowest to highest numbered step.

    To run the task from a specific step:

To run the task from a specific step:

  1. Select the step that should start the execution process.

  2. Click Run From Here or press SHIFT+CTRL+F5. The steps will run sequentially starting from the step you selected.

To Step Through a Task:

  1. Click the Step button. The first (or selected) step of the task runs. At this time you can:

    • Examine the contents of your variables by looking at the Variable View of the Debug Window

    • Examine the states of any watches you have set, using the Watches View of the Debug Window (see below for more information on watches)

    • Observe what the previous step may (or may not) have done by reading the contents of the Output View.

  1. Continue clicking Step to execute the next line until you reach the end of the task or until you have determined the issue.

  2. You can also run the rest of the task at regular speed from this point forward by clicking Run from hereor pressing CTRL+SHIFT +F5. Click Stop or press CTRL+F2 at any time to stop a step process.

NOTE: If you import a task that includes an unlicensed action/activity, the Steps panel will display the unlicensed step (in Visual view) as currently unlicensed. Running a task that includes an unlicensed step will always fail at that step. You can bypass the step by disabling it or removing it altogether.

More on "Stepping"

“Stepping” is the process of executing a task one step at a time. When clicking the Run button, task execution may happen so quickly that it’s too complicated to determine what is causing the problem and where that problem takes place. The Step button is ideal for such a situation because clicking this button will execute one step, then wait, providing a chance for the developer to examine what the previous step may (or may not) have done or observe the contents generated in the Debug window in order to better diagnose the task. The Step button can be accessed by way of the keyboard by hitting the F9 key.

NOTE: Most Task Builder commands and controls contain a corresponding shortcut key (or hot-key). To determine the appropriate shortcut for a control, simply hover the mouse over it.

Control running tasks

You can manually pause or stop a currently running task at any time during its execution.

To suspend a running task:

  • Click Pauseor press F6. Upon doing so, the task delays execution at the current line. Click Pause or press F6 again to resume execution.

To stop a running task:

  • Click the Stop button or press CTRL + F2. The task immediately stops at the current line and resets itself.

NOTE: The Pause and Stop buttons are usually disabled and are active only during task execution.