Specifying Dependencies

Overview of Dependencies

After you have created a flow, you can specify dependencies for the flow. Without dependencies, all of the jobs in the flow run immediately and simultaneously. Dependencies let you specify the conditions that must be met before a job in a flow runs.
To create dependencies, you can use either the visual flow editor or the standard interface.

Using the Visual Flow Editor

After you have selected the jobs to be included in a flow, you can use the visual editor to graphically display the flow. The visual editor displays the dependencies and relationships between the jobs, enabling you to better understand the structure of complex flows. You can also add jobs and gate nodes to the flow.
To use the visual editor, follow these steps:
  1. In the navigation area, select a defined flow and select Actionsthen selectEdit Flow. The flow is displayed graphically in the display area.
    flow editor
    The dashed lines identify the relationship between a job and a dependency. You can select and move any element in the window. To connect elements in the window, move the cursor to an open end of the element and drag the line to another element. Inputs are on the left side of an element and outputs are on the right side.
  2. Add a file event, a time event, a deployed job, or a subflow to the flow by selecting the appropriate choice from the Actions menu, the toolbar, or the context menu. When file events and time events are added, they are not associated as a dependency with any job. You must incorporate the event into the flow in order for the event to function.
    adding a event
  3. Add a gate node to the flow by selecting Actionsthen selectAdd Gate. The Add a Gate Node dialog box appears. A gate node specifies a condition where a job runs when either one or more specified conditions occur or all specified conditions occur. Select the type of gate you want to use and click OK. The node appears in the editor, but is not identified with any jobs.
  4. To specify the input for a gate, move the cursor to the open end of a job or event and drag the dashed line to the input for the gate. When you connect a job to a gate, the New Job Event dialog box appears, where you can specify the condition for the event.
    To specify the output for the gate, move the cursor to the output end of the gate and drag the line to the input for the job.
    adding a gate
  5. Add a subflow by selecting Actionsthen selectAdd Subflow. The Add Subflow dialog box appears. Select a flow that you want to include as a subflow in your flow and click OK. The subflow appears in the editor as a job event. You can specify the subflow as a job event dependency for a job in the flow or add it as an input for a gate node.
    adding a subflow
  6. SelectActions then selectSave Flow to save the flow and leave the visual editor open. Select Actions then selectClose Flow to save the flow and close the visual editor. Select Actionsthen selectSchedule Flow to save and schedule the flow on the selected scheduling server.

Using the Standard Interface

To use the standard interface to create a dependency for a job in a flow,
  1. From the navigation tree, select the Schedule Manager plug-in and select the flow inside which you want to create job dependencies. Click the plus sign next to the flow to display the jobs that are contained in the flow. Select a job for which you want to specify dependencies and select Manage Dependencies from the pop–up menu, the Actions menu, or the toolbar. The Dependencies window appears.
    manage dependencies window
  2. The Dependencies window lets you specify time dependencies (the job runs at a specified time or day), job dependencies (the job runs based on another job in the same flow), and file dependencies (the job runs based on conditions associated with a specified file). You can also specify whether the job runs only when certain dependencies are met, or if all dependencies must be met.
  3. Click New next to the Time dependencies list to define a new time dependency. A time dependency specifies that the job runs on a specified day at a specified time.
    new time event window
    In the New Time Event dialog box, select the type of recurrence (if any) and then specify the interval between runs, and the dates and times when the jobs run. Click OK when you have finished defining the event.
    If you are using a Platform Computing scheduling server and have not selected the Define time events in a server-independent format option (on the Options window for Schedule Manager), the New Time Event dialog box uses a different format.
    new time event window
    In this version of the New Time Event dialog box, you must first select the calendar from the Calendar name drop-down list. The calendar identifies the days for the dependency. Refer to the online Help for the Schedule Manager plug–in for more information.
    After you specify the calendar, use the Hours and Minutes fields to specify the time at which the job runs. Specify how long the job is active in the Duration of event field. This field specifies the number of minutes after the specified time has been reached that the dependency remains active (for example, when the job should start at a certain time but has to wait for the completion of a file event). Click OK when you have finished defining the event.
  4. Click New next to the Job dependencies list to define a job dependency. A job dependency specifies that the current job runs if a specified event occurs with another job. For example, you can specify that the current job runs when Job A completes successfully, or you can specify that it runs when Job A ends with a specified exit code.
    new job event window
    In the New Job Event window, select the job that the current job is dependent on from the Jobs drop-down list, and then select the event that is part of the dependency from the Event Type drop-down list (such as successful completion, ending with a specified exit code, or failing to start). Some event types require you to specify additional information (such as an exit code or a run time) that is part of the dependency. Not all event types are supported on all scheduling server types. Click OK when you have finished defining the dependency.
  5. Click New next to the File dependencies list to define a file dependency. A file dependency specifies that the current job runs if a condition is met on a specified file. For example, you can specify that the current job runs whenever File B is created, or that it runs when File B becomes larger than a specified size.
    new file event window
    In the New File Event window, specify the file (in Windows, you must specify the full path) upon which the job is dependent in the File name field and the file state that must exist in the Condition field (such as that the file exists, that the file is a specified size, or that the file is beyond a certain age). Not all file event types are supported on all scheduling server types. Click OK when you have finished defining the dependency.
  6. When you have finished defining dependencies for the selected job, click OK in the Dependencies window.