Visual Script

This feature allows you to run multiple tasks in sequence.  You can run programs, email, web, ftp and all other tasks from the Script.  If a certain task fails, you can choose to stop the Script. You can also skip ahead to another task in the Script. The Visual Script task is an extension of the 7.x Chain task.

Creating a Script
From the front panel: click on the Script button.

Adding Tasks to your Script
You can add new tasks or existing tasks to your script.
To add a new task: In the task type tree, Select the task type and click on the Add New Task button
To add an existing task: Click on the Add Existing Task Button.

Email Notification of tasks in the Script
By default, only the Script itself can trigger email notification based on exit code.  The tasks in a Script do not trigger email notification, even if they satisfy an email notification profile.  You should select this option, in order to allow tasks in the Script to trigger email notification.  The Script will move on to the next step, only after the email notification has been completed.

Starting Script at specified step
You can specify a step to start at, by entering the step number, or the step title in this field.  By default, the Script will start at step 1, if this field is left blank.

Deleting Tasks from your Script
Select the task in the bottom table and click the delete button.

Editing Tasks in your Script
Select the task in the bottom table and click the edit button. The task parameters will be loaded into the window.  You can then make any changes you require and click the "Update Task" button.

Positioning a Task within your Script
Select the task in the bottom table and use the move-up or move-down buttons as required.

Enable Step
You can enable or disable a step.  If a step is disabled, the task will move on to the next step.

Skip to Step options
You can choose to skip to certain step in the Script, if a certain exit code criteria is met.  If you wish to stop the Script, because a certain exit code criteria is met, enter a Skip to Step value, which is greater than the total steps in the Script.

Skip to Step (or Title)
1) You can enter either the step number in the Script, or the task title. This task title has to be a valid title in the Script list.
2) You can also run multiple tasks simultaneously using the following rules:
a) Separate each Task Title by &. Example: TaskTitle1&TaskTitle2&TaskTitle3 (no spaces allowed)
b) You can only enter Task Titles, NOT step numbers.
c) TaskTitle1 has to be a valid Task Title in the Script list
d) TaskTitle1 CAN NOT be the last step in the Script list. You can add a dummy delay task as the last step in the Script, if TaskTitle1 happens to be your last step.
e) TaskTitle2, TaskTitle3 etc. DO NOT have to be in the Script list. They have to be valid tasks in the task list.
f) In this simultaneous mode, all tasks (TaskTitle2, TaskTitle3. etc.) will be triggered simultaneously. The Script will then continue normally at TaskTitle1.

Rerun Options
You can choose to rerun the task, if it meets certain exit code criteria.  You can also set the maximum number of times to rerun a task.  The task will rerun, while the rerun criteria is valid, until the maximum rerun count has been met.

Maximum Wait Time
This is the maximum time (T1) the Script will wait for your task to finish. Enter 0 to wait forever until the task finishes its run.  Please note that the Script will not kill or terminate your task because it is unsafe to do so.  It just waits for your task to complete normally.  If the task does not complete normally in the allotted time, the Script will assume that the task has failed.  The email, web, ftp and most other tasks will terminate normally.
For the DirChange and Command tasks, please ensure that you can Terminate the task within the Task settings itself.  Both these tasks have a safe Termination time (T2) that can be set within the task.  Please set T1 T2.  If you have set the Command or DirChange task to rerun on failure, please set the T1 (T2+Td)*n, where Td is the delay between reruns, and n is the number or reruns.

Why not just Kill a task when the wait time is exceeded
Short answer from us: In the Script, each task is run as a thread.  Killing a thread is unsafe, and may corrupt your system hours or days in the future.
Long answer from Java documentation: Because it is inherently unsafe. Stopping a thread causes it to unlock all the monitors that were locked. (The monitors are unlocked as the Thread Death exception propagates up the stack.) If any of the objects previously protected by these monitors were in an inconsistent state, other threads may now view these objects in an inconsistent state. Such objects are said to be damaged. When threads operate on damaged objects, arbitrary behavior can result. This behavior may be subtle and difficult to detect, or it may be pronounced. Unlike other unchecked exceptions, Thread Death kills threads silently; thus, the user has no warning that his program may be corrupted. The corruption can manifest itself at any time after the actual damage occurs, even hours or days in the future.