Process Specification
Process specifications describe the logic inside each process on a DFD. Three main tools are used: Structured English, Decision Tables, and Decision Trees. Each tool is suited for different types of process logic.
Structured English
Structured English uses a restricted subset of English combined with programming-like constructs to describe process logic in plain language. It is readable by non-technical stakeholders.
PROCESS: Calculate Shipping Cost
IF order weight is less than 1 kg THEN
shipping cost = $5.00
ELSE IF order weight is between 1 kg and 5 kg THEN
shipping cost = $5.00 + (order weight x $1.50)
ELSE IF order weight is greater than 5 kg THEN
shipping cost = $12.50 + (order weight x $2.00)
ENDIF
IF customer is a premium member THEN
shipping cost = shipping cost x 0.80 -- 20% discount
ENDIF
IF shipping address is international THEN
shipping cost = shipping cost x 2.00
ENDIF
Decision Tables
Decision tables organize complex business rules in a grid format with conditions on the left and actions on the right. They are ideal when multiple conditions interact to produce different outcomes.
Rule 1 Rule 2 Rule 3 Rule 4
Conditions:
Weight < 1kg Y Y N N
Domestic Y N Y N
Actions:
Standard ship X X
Heavy ship X
Int'l ship X
Decision Trees
Decision trees present conditional logic as a branching tree structure. They are visual and easy to follow for sequential decision processes.
[Weight < 1kg?]
/ \
Yes No
/ \
[Domestic?] [Weight < 5kg?]
/ \ / \
Yes No Yes No
| | | |
$5.00 $10.00 $5.00+$1.50/kg $12.50+$2.00/kg
Comparison of Tools
| Tool | Best For | Limitations |
|---|---|---|
| Structured English | Sequential processes, loops, simple conditions | Unclear with many interacting conditions |
| Decision Table | Complex rules with many condition combinations | Can become very large with many conditions |
| Decision Tree | Sequential, branching decisions | Hard to read with too many branches |
When to Use Each Tool
- Structured English: When the process involves loops, iterations, or sequential steps
- Decision Table: When there are many combinations of conditions (e.g., insurance rules, tax calculations)
- Decision Tree: When decisions follow a natural branching path (e.g., loan approval, medical diagnosis)
Summary
Process specifications ensure that every process in the system is clearly defined and unambiguous. Choosing the right tool for the type of logic involved leads to clearer documentation and fewer implementation errors.