When a task must be completed before another can begin, a dependency exists between them. Charting dependencies in your project is a key part of understanding the critical path of tasks that leads through to its successful completion, on time and within budget.
Using the Gantt chart in Task View, you can represent the relationships between tasks with dependency lines. A dependency line is drawn from the beginning or end of one task (or group, or milestone) to the beginning or end of another.
When you create a dependency, the dependent task automatically reschedules itself to respect the dependency. With further changes to the schedule and leveling, the tasks continue trying to follow the dependencies. If a dependency becomes impossible or you manually cause a task to stop obeying its dependencies, a violation occurs, which can be resolved with the Violations window.
The Omni Automation support in OmniPlan is particularly useful for automating the creation and setup of tasks and their related dependencies.
The properties of a dependency.
dependent (Task) • The dependent of this dependency, which is the target Task whose schedule is effected.
dependentAlignedToEnd (Boolean) • Whether this dependency aligned to the start or the end date of its dependent task. A value of true indicates the dependency between the tasks begins at the end of the first task.
OmniPlan supports four types (*) of dependencies that describe the ways in which tasks relate to one another. The dependency connection between two tasks can be tethered at either the beginning or end of task.
FinishFinish* (DependencyKind r/o) • With Finish to Finish, when the first task ends, then the second one can end; the tasks may overlap.
FinishStart* (DependencyKind r/o) • With Finish to Start, the first task must end before the second task can start; the tasks must not overlap except at the instant the first one ends. This is the most common type of dependency, and the kind that you get when you connect two selected tasks by clicking the Connection button in the toolbar.
Invalid (DependencyKind r/o) • This will be the result of a property query if the current connection is an invalid dependency kind.
StartFinish* (DependencyKind r/o) • With Start to Finish, once the first task starts, the second one can finish; the tasks must overlap at least at the instant the first one starts.
StartStart* (DependencyKind r/o) • With Start to Start, once the first task has started, the second one can start; the tasks may overlap.
all (Array of DependencyKind r/o) • An array of all items of this enumeration.
Here is a script example demonstrating the establishment of a dependency between two newly created tasks. In this example, the dependent task is set to begin after the prerequisite task has completed.
1 The first task is created by executing the addSubtask() method on the rootTask object of the base scenario. The resulting reference to the created task object is stored in the variable: task1
2 The created task is assigned the title “Prerequisite”
3 A second task is created by executing the addSubtask() method on the rootTask object of the base scenario. The resulting reference to the created task object is stored in the variable: task2
4 The second created task is assigned the title “Dependent”
5 A dependency is added to the first created task by executing the addDependent(…) method with the first task instance, passing in the stored reference to the second created task (task2) as the direct parameter of the function. The resulting reference to the new dependency object is stored in the variable: dependency
6 The new dependency is assigned a dependency type by setting the value of its kind property to the one that indicates that the dependency begins at the finish or the first task and ends at the beginning of the second task. In terms of the dependency kind class, the type is: DependencyKind.FinishStart
Here is the result of the execution of the example script in the document:
The same result can be achieved with an abbreviated version of the previous script, where tha type of dependency is assigned in the statement in which the dependency is created. (see line 5)
Also note that the same results can be achieved by creating a dependent relationship between the two created tasks using the addPrerequisite(…) function of the Task class called on the second task instance rather than the first task instance. (see line 5)
X For each of the found tasks, get an array of its dependent objects, and then clear any dependent relationships using the remove() function of the Dependency class.
Add “Lead-Time” to Dependency
Sometimes it is practical to add a delay to a dependency so that non-project related events can occur. For example, say you order new kitchen cabinets for a renovation project. There would be two tasks: “Order the Cabinets”, and “Install the Cabinets”. To allow for the cabinet fabrication and shipping, you would add a “lead-time” duration (perhaps 12 days) to the task dependency object.
01 Store the name for the task group in the variable: groupTitle
02 Store the titles for the subtasks in the variable: jobTitles
03 Create a new top-level task and stored the resulting object reference in the variable: groupTask
04 Assign the stored group task name to the created task.
05 Set the value of the type property of the created task to TaskType.group
06 Instantiate the variable subTasks to contain an empty array that will hold object references to the created subtasks.
08 Call the addSubtask() function on the group task object to add a new subtask to it.
09 Set the title of the created subtask to the iterated title.
10 Add the object reference of the created subtask to the array of subtasks.
11-14 If the created subtask is not the first one, add a prerequisite dependency to the previous subtask.
13 Set the value of the kind property of the dependency to the desired type, which in this case is: DependencyKind.FinishStart
By changing the value of the dependency’s kind property (line 13) to DependencyKind.StartStart the subtasks can be set to run a concurrent (simultaneous) manner:
This webpage is in the process of being developed. Any content may change and may not be accurate or complete at this time.