User Guide > Getting Started Guide > Using Workflows

Using Workflow Objects

Aim:
- Creating a Workflow object
- Using the Workflow Monitor

Lesson 9

This lesson serves to introduce you to the object type Workflow. It comprises objects that run in sequence, which is very useful for maintaining the AE databaseA database is an organized collection of data including relevant data structures..
Archiving and reorganization is required in order to maintain the database. These maintenance processes must run in succession which is best organized by using Workflow objects. As a matter of principle, Automic strongly recommends handling your processes using workflows and schedules in order make use of the full benefits of AE's object orientation.  

The job and the two existing file transfers will now be integrated in a workflow.

  1. Open the particular folder in the Explorer in which you stored all the created sample objects so far.
  2. Click the  button in the toolbar.
  3. Select the object type JOBP (workflow).
  4. Assign an adequate name and double-click the Workflow object to open it.
  5. Change to the Workflow tab. By default, the start and end boxes are already available.
  6. Insert the job and both file transfers. This can be done in two ways (as with Schedule objects,):

    Method 1 - Drag & drop one or several objects from the Explorer to the Workflow tab.

    Method 2 - Call the command "Add Task" by using the right mouse button. You can either enter the name of the object manually or click on the three dots to open a new Explorer window from which the object can be selected.
     The objects are displayed as boxes which can be moved and positioned as you like. The lens symbols shown in the toolbar can be used to zoom into or out of the workflow.
  7. Order the objects starting with the two file transfers, followed by the job as shown in the illustration below:


     Structuring the objects provides a clear overview. Automic recommends using several workflows when there are a lot of objects or including other Workflow objects - called sub-workflows - in a workflow.
  8. The execution order for the objects is determined by lines. Right-click on an empty space in the Workflow tab and select the command Line Tool. The mouse pointer is now displayed in the form of a pencil symbol.
  9. Connect the individual object boxes with lines (left-click with the mouse and draw it from box to box). The illustration below shows the result thereof:


     An object within a workflow will only be activated when all its predecessors have ended. Therefore, the job in our example will only start when the files of the two file transfers have already been transferred.
  10. Store your modifications using the  button in the toolbar and close the Workflow object.

The next step is to execute the workflow:

  1. Highlight the workflow in the Explorer and start its execution with the  button in the toolbar.
  2. The Workflow object is now displayed in the Activity Window. Due to the default settings, the Workflow Monitor also opens.  Watch the workflow execution. Tasks that are being executed are displayed green; tasks that have already ended are shown in gray. Red signals that an error occurred (such as the file that should be transferred does not exist).


     The default setting is that the workflow will automatically be removed from the Activity Window as soon is has ended. The Workflow Monitor will also be closed. These settings can be changed in the Attributes tab of the Workflow object.

 

Exercise

Delete the lines between the boxes (right-click with the mouse to highlight the particular line and then click Remove dependency using the left mouse button to delete it). Arrange the three objects one after the other. Then draw new connecting lines. When watching the execution of this workflow, you will notice that the workflow starts with the first object, and then the second object is processed and so on. Each object waits until its predecessor is finished.

Finally re-arrange the objects as shown in the above illustration.