Previous Topic: Defining DependenciesNext Topic: Some Additional Dependency Concepts


Types of Dependencies

You can clarify the meanings of dependencies on a Dependency Diagram by depicting different types of dependency.

Three primary types of dependency can be distinguished on a Dependency Diagram:

Sequential Dependency

A sequential dependency involves two processes, one of which depends the other. When the prerequisite process executes, it fulfills its post-condition and satisfies a pre-condition that allow the dependent process to execute.

The following illustration shows a sequential dependency between two processes, Pick Goods and Pack Goods.

Types of Dependencies

Pick Goods, if it completes successfully, satisfies the post-condition "goods have been picked" which is, in turn, a pre-condition of Pack Goods. In other words, goods cannot be packed until they have been picked from stock. The structure in the illustration reads as: "Pack Goods execute only if goods have been picked."

Parallel Dependency

A parallel dependency involves three or more processes: one is a prerequisite process, and the rest are dependent processes.

When the prerequisite process executes, it fulfills its post-condition and satisfies the pre-condition of each dependent process. Consider the following illustration.

Types of Dependencies (2)

Receive Goods, if it executes successfully, satisfies the condition "goods received," which is a pre-condition of both of the dependent processes Pay Supplier and Store Goods. These two processes can execute independently and possibly simultaneously. The structure reads: "Pay Supplier and Store Goods each execute if goods are received."

Mutually Exclusive Dependency

A mutually exclusive dependency involves three or more processes: one is a prerequisite process, and the rest are dependent processes.

When the prerequisite process executes, it satisfies one of a number of alternative (mutually exclusive) post-conditions, each of which is a precondition of exactly one dependent process. This dependency is quite different from sequential and parallel dependencies because it is associated with multiple alternative conditions.

The structure in the following illustration reads: "Interview Candidate result in either the candidate accepted or the candidate is not accepted." "Hire Candidate execute if candidate is accepted." "Reject Candidate execute if candidate is not accepted."

Types of Dependencies (3)

In the diagram, the dependency Candidate Interviewed represents the matching of these conditions. The darkened circle where the dependency diverges indicates a mutually exclusive dependency, and thought of as testing the post condition to decide which dependent process should execute.

Interview Candidate, if it completes successfully, satisfies either of the conditions "candidate accepted" or "candidate not accepted," but not both.

The post and preconditions of a mutually exclusive dependency cannot be described meaningfully without including the name of each process that is associated with a particular condition, but this violates the guideline for descriptions. See the Defining Dependencies section in this chapter for more information. In this case, clarity is more important than avoiding the mention of process names.

For the condition recorded in the dependency description...

Rather than: "Candidate is accepted or candidate is rejected," use: "Candidate is accepted, enabling Hire Candidate, or candidate is rejected, enabling Reject Candidate."

Mutually exclusive dependencies also differ from other dependencies in that they can be closed.

Closure of a mutually exclusive dependency takes place when two or more dependent processes are prerequisite to a common process.

Suppose the reaction of the candidate to the decision was analyzed, regardless of whether the candidate is accepted or rejected. This situation can be modeled by adding a new process, Analyze Reaction, which depends either Hire Candidate or Reject Candidate, as shown in the following illustration.

Types of Dependencies (4)

An execution of either Hire Candidate or Reject Candidate can satisfy a post-condition "candidate informed of decision" that is also a precondition of Analyze Reaction.

The new dependency closes the mutually exclusive dependency and is depicted by two lines converging and entering Analyze Reaction as a single line.

The closing of the dependency that is shown in the illustration reads: "Analyze Reaction execute if the candidate is informed of the decision, either following Hire Candidate or Reject Candidate."