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. The types of dependencies are:
  • Time dependency, which specifies that the job runs on a specified day at a specified time. For example, you can specify that the job runs every weekday at a specified time
  • Job dependency, which 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.
  • File dependency, which 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.

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.
    For example, when you select Actionsthen selectAdd File Event, the New File Event dialog box appears.
    new file event window
    After you specify the information required to define the file event, the event appears in the visual flow editor. Connect the event to the job for which it will serve as a dependency.
    adding an 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 that 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. Select Actions 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.