On Error Tab

On every Action, the On Error tab specifies what Advanced Workflows should do if this step encounters an error as defined in the Error Causes properties. The default behavior is that task execution stops in the immediate step that encounters the error; the On Error properties allow you to designate how Advanced Workflows should respond upon the occurrence of an error. For example, a step can send an email, execute another task, or log specific text to the Windows Event Log upon error. In addition, a step can be set to continue to the next step in spite of an error.

  • All On Error properties are optional entries.

  • NOTE: To send an email on error, the default mail server must be defined in the registry.

Property

Type

Default

Markup

Description

Retry the step x times

Number

(Disabled)

AM_RETRY=6

Indicates the amount of times execution of this step should be retried if it encounters an error as defined in the Error Causes properties. This property is disabled by default.

Pausing x milliseconds

Number

(Disabled)

AM_RETRYDELAY=3000

Specifies the amount of milliseconds this step should wait between retries as defined in the Retry the step x times parameter. This property is disabled by default.

Execute the following error actions

Text

(Empty)

a) AM_RUNTASK=Task1 (Start Task)

b) AM_SETVAR=Var1;0 (Set Variable)

c) AM_EMAIL=

d) AM_WRITETOEVENTLOG=0 (Write to Event Log)

e) AM_WRITETOAMLOG=Error Task 2 (Write to Log)

f) AM_PLAYSOUND=c:\

Allows a variety of actions to be executed upon the occurrence of an error. Click Add to add a new error action. This property is disabled by default.

The available options are:

  • Start Task - Starts another task upon error.

  • Set Variable - Sets the value of an existing variable upon error.

  • Send E-mail - Sends an e-mail upon error.

  • Play Sound - Plays the selected sound (.wav) file upon error.

  • Write to Windows Event Log - Writes the specified message to the Widows Event Log upon error.

  • Write to Log - Writes the specified message to the Event Log upon error.

After error event

Text

(Empty)

a) AM_ONERROR=

b) AM_ONERROR=CONTINUE

 

Include Subfolders

Yes/No

(Empty)

SUBFOLDERS=YES

When set to YES, specifies that, if present, subfolders should be searched for files matching the mask specified in theRemote Filesparameter. The default value is NO.

Match Case

Yes/No

No

MATCHCASE=YES

Indicates whether the properties set within this activity should be case sensitive in relation to the FTP server. The default value is NO.

Exclude Mask

Text

(Empty)

EXCLUDE="*.txt

Causes this activity to omit any files matching the mask(s) specified. Filenames or wildcard masks (e.g., * or ?) may be used.

Regular Expression

Yes/No

No

RE="YES"

Specifies whether the value in the Exclude Mask parameter is a regular expressions. Regular Expression, also referred to as regex or

If the step errors, carry out the following actions:

If enabled, this allows the task developer to specify that the step should be retried a chosen number of times along with a chosen amount of time to wait between retries, before actually considering it a true step failure, in which case, the remainder of the error actions will be carried out (option disabled by default).

Execute the following error actions

Allows a variety of actions to be executed upon the occurrence of an error. Click Add to open the Error Action dialog box and specify one of the following actions to take when an error occurs:

  • Start Task—Start another task upon error. Select the task from the drop-down menu. This action can be used to start a task to rectify the error. In the Task to start field, select the drop-down list of currently available set of tasks.

  • Set Variable—Sets the value of an existing variable. Can be used to set a variable with the return code. Select the variable in the Variable name box, and enter the value in the Variable value field.

  • Send E-mail—Sends an e-mail upon error. Useful way to alert the proper recipient(s) of the problem. The message will be populated with information about the specific error that occurred as well as other important task information. In the To and From boxes, enter the recipient e-mail address and an e-mail address to be used in the From header. (Many SMTP mail servers require a valid From address.)

  • Play sound—plays a specified sound file. In the Sound File box, click Open Folder and navigate to the sound file to be played.

  • Write to Windows Event Log—Writes the specified message to the Widows Event Log upon error. In the Text box, enter the text or specify the variable to be written to the log.

  • Write to Log—Writes the specified message to the Advanced Workflows Event Log upon error. In the Text box, enter the text or specify the variable to be written to the log.

After Error Event

Specifies what the step should do regarding execution directly after the error event occurs.

  • Stop task—Stops the task and initiates task level error handling. This is the default setting.

  • Continue to next step—Continues the task in spite of the step error. Use this option if the error is non-critical or if additional error handling steps are specified in a subsequent step.

  • Break Loop—Specifies that if the step is inside a loop, it should stop looping and go to the step (if any) following the End Loop.

  • Goto label—Goes to the specified label. The label must be created in and earlier step using the 'Label' action. In the Label box, select the label. If the task has been saved, existing labels appear on the drop-down list. Labels can be viewed under the Labels tab of the Debug pane.

  • Goto step—Specifies that Advanced Workflows should skip to another step in the task. In the Step box, specify the step number to go to.
    NOTE: Too many Goto instructions can produce extremely unmanageable tasks. It is usually better to create a separate task and use Start Task instead.