Tasks

A task represents a component of a schedule. It defines a set of sessions which are to be executed concurrently and it provides a combined status outcome of those sessions so that the scheduler can determine which task to execute next.

A session is a top level process which runs on a runtime resource. Each task can contain an arbitrary number of sessions. When the task is executed, each session is first created and, once they are all registered and pending on their host resources, they are executed.

When a schedule is created in Control Room, a task called New Schedule – New Task is automatically created within the schedule. The initial task within the schedule defaults to this task.

Task Configuration - Click for a larger image

A task can be configured to run a number of different processes on runtime resources, and specify subsequent tasks to pass control to, depending on the outcome of those processes when executed.

Create a task

To create a task, right-click the appropriate schedule in the navigation panel and select New Task.

A new task, populated with default values, will be created and automatically selected underneath the schedule node. Update the task name and add a description if required.

Configure a task

Set the task execution order

See Set an initial task to execute for details on how to specify which task should be executed first when a schedule is activated.

The task which is to be executed after this task has completed successfully can be specified by selecting the appropriate task from the On Complete drop-down list. The Stop option indicates that the schedule should complete after this task has completed.

The task which is to be executed after this task has been terminated can be specified by selecting the appropriate task from the On Exception drop-down list. The Abort option indicates that the schedule should terminate after this task has terminated.

Configuring a task

Session failure detection

By default, a task is configured to fail fast on any errors, that is to immediately terminate the task if any sessions fail to start or terminate due to an exception. This can be overridden by deselecting the Fail fast on any errors check box.

  • If a task is set to fail fast, all sessions and the task will be terminated when any errors in any of the sessions occur, for example, if a resource couldn't be contacted or was too busy to create a session, or if a session raised an exception and terminated abnormally. This means that a task is marked as terminated if any sessions fail.
  • If a task is set not to fail fast, a task is only terminated if an error occurs in all of its sessions – and that task termination only takes place when the last running session is detected to have failed. Any individual session executions which cause an error are logged, but any other running sessions continue. If not failing fast, a task is marked as terminated only if all of its sessions fail.

Maintain scheduled sessions

When a task is executed, all sessions defined within it will be run concurrently.

There are no restrictions on sessions within a task. For example, multiple processes can be specified to run on the same resource. If such processes are exclusive, the task will be terminated due to the fact that the resource is too busy to run anything other than the first process.

Create a session

A scheduled session is created when a published process is dragged onto a resource, or vice versa.

Creating a session

Once a session has been created, it will be listed in the Scheduled Sessions list.

There are no restrictions on the number of sessions within a task. Multiple sessions can be created within a task across available resources and multiple processes can be scheduled to run on the same resource.

  • The scheduler can only create and run sessions on public resources (started with the “public” switch for example Automate.exe /public /resourcepc).
  • If multiple processes area scheduled to run on the same resource, and any of the processes are exclusive, the task will be terminated as the resource is too busy to run anything other than the exclusive process.
  • Consider scheduling sessions to run on resource pools rather than individual resources. Resource pools give the benefit of greater reliability to schedules as Blue Prism has several available resources to choose from, rather than having a single resource to depend on. See Resource pools for more details.

Set process parameters

If a process in a session requires startup parameters, they can be configured by right-clicking the appropriate session and selecting Startup Parameters from the context menu.

See Start parameters for further details.

Post completion delay(s)

If a value is entered in this field, a delay of between 0 and 1500 seconds is added to the end of a scheduled task before allowing the next task in the schedule to commence.

Delete a session

Right-click the session and select Delete to remove the session from the task.

Save a task

A task cannot be saved directly – changes to a task implicitly cause changes in its parent schedule, so in order to save a task, its schedule must be saved.

For more details, see Schedules.

Copy a task

A task can be copied and pasted either to its parent schedule (cloning the task), or to a different schedule altogether.

Due to the way this is implemented, copying and pasting can only be performed within a single instance of the Blue Prism application – it cannot be copied from one running application and pasted into another.

To copy a task:

  1. Right-click it and select Copy.
  2. Right-click the target schedule in the navigation panel and select Paste.

This does not use the system clipboard and, as such, is unaffected by other cutting / copying operations. This also means that the copied task does not exist outside of the currently executing schedule manager.

Delete a task

Right-click a task in the navigation panel and select Delete.

Any references to the task by another task (as its next task in the On Complete or On Exception drop-down list) or by the schedule (as its initial task) will be reset to the default when the task is deleted.

Configure task alerts

You can configure alerts to be sent at specified stages of a task execution as part of a schedule execution. For details on how to configure task alerts, see Process alert configuration.