Tasks are automation routines that have the power to manage external resources such as cloud services or internal data center assets. Editing or creating a Task brings you into the Task editor which provides a drag and drop interface for adding logic to the Task and testing the Task execution.
From the top menu, select Tasks -> Manage Tasks. This menu link presents a list of Tasks defined in this environment. To filter this list enter text into the box next to the Search button and press Search.
Tasks can be copied and given a new name, deleted, and exported to file for use in another Automate install.
Selecting Create will prompt for a Task Code, Name and Description and direct you to the Task Editor.
The Task editor is split into two main sections: the Toolbox on the left and the Step Canvas on the right. On the right panel at the top is a Codeblock selector.
The Task Editor automatically saves changes to the database when you move out of a field. Changes cannot be undone.
The Toolbox contains the following tabs:
Details - Task Name, Code, Description. Concurrent Instances and Number to Queue are future features.
Versions - Allows for the creation of new versions of the Task. One of the versions must be flagged as the default version. Approving a Task locks it so that it can't be modified further.
Commands - The library of all available Task Commands.
Run - Allows for the Task to be run from the Task Editor page. Also can be used for scheduling the Task for later execution.
Tags - Associating a Task with one or more Tags will restrict it's editability to a select group of Developers.
Schedules - Lists the schedules that the Task appears on and the near future instances.
Parameters - Input parameters to the Task upon execution. If the Task is run from the user interface, the user will be prompt for these parameters.
Clipboard - A global, persistent clipboard facilitates storage of Task Steps for transfer between Codeblocks and across Tasks.
Codeblocks can be thought of as procedures or functions that can be called during a Task's execution. Every Task has a MAIN codeblock, but the developer can easily add Codeblocks as they need.
On the right side of the screen, selecting the drop down arrow next to the word "MAIN" will show the Codeblock menu from which you can create new Codeblocks or edit, delete or rename existing Codeblocks.
The MAIN Codeblock is required - it cannot be deleted or renamed.
When a particular Codeblock is selected in the drop down, the commands in that Codeblock are displayed on the editor.
To see printable view of the the Task, click on the printer icon on the right side of the Codeblock bar.
The Step Editor on the right holds the Steps that are present in the current Codeblock. These Steps are added to the Editor by dragging them over either from the Commands or Clipboard tabs.
Steps are Drag and Drop enabled.
To add a Step Command, select the Commands tab in the Toolbox. Click on a Category to view the Commands available per Category. When you have chosen a Command, drag it over to the right. (With the first one you may have to position it near the top immediately below the Codeblock name.) Drop the Command and it will render on the Canvas.
As you add more Commands to the Step list notice that they have an order. The Step order can be reordered by grabbing a Step in the header section, dragging and dropping into the desired position.
Each step can be collapsed or expanded by clicking on the small arrow on the left side of the Step header. To expand or collapse all steps, click on the icon immediately to the left of the Codeblock name at the top.
To copy a Step into the Clipboard, click on the Copy icon on the right side of the header of the Step. This will place a copy of the Step into the Clipboard for later use on this or another Task.
The Skip (pause/play) icon on the right will "comment" or "uncomment" a Step. This step will be skipped during Task Execution.
To delete the Step from the Codeblock, click on the x delete icon all the way to the right in the Step header. A confirmation prompt will appear.
Common Command Properties
While Commands have their own specific properties, there are several properties shared across all Commands.
At the bottom of every Command area, there are a series of small buttons. All Commands have at least two buttons, others may have more. These buttons show additional information that need not be visible all the time, but may occasionally be necessary.
The Notes button displays a field where notes, description, or other commentary may be entered for a specific Command. For example, a complex SQL query may require some additional notes so a future developer can understand how it was designed.
Notes have two special behaviors: 1) a snippet of the note will be displayed in the Command title so short, helpful comments will be seen even if the Notes section is hidden and 2) the Note body is parsed for three special keywords. If any of these keywords are found, the Command title will get a colored flag:
IMPORTANT - will display a red flag
TODO - will display a yellow flag
NOTE - will display a blue flag
Notes are optional on all Command types.
The Help button shows a panel with Command specific reference material. This information will be very useful to someone new to the tool, and even seasoned developers may reference the help panel on the more complex Command Types.
Help is available on all Command types.
The Options button displays a panel with optional additional properties for a Command. While most Commands only have a few key properties, others more complex Commands may have additional fields not often used.
Options are only available on certain Command types.
The Variables button displays a panel where you can manage the runtime Variables populated by the Command. Some Commands, like Execute SQL or Command Line, are capable of advanced parsing of the data they return into Variables.
If a Command is capable of populating variables, the Variables button will be available. Some commands do not have a Variables button, but might have a property such as Result Variable. In these cases, the entire output of the Command is placed into the specified variable.