Problem – Describing a Temporal Restriction of One Entity to Itself
Evaluation of a series of events is frequently required to determine the state of an entity in terms of acceptable values for attributes. The pattern of prior states or events may also dictate permissible courses of action.
An entity's temporal history can be defined through ordering rules that are expressed in terms of functional restriction, scope, and direction. Temporal ranges and points are used to establish conditional thresholds. Some applications of this pattern may require consideration of a single temporal range; other may require two or more.
Example – Medical Permission A student who misses school for more than five days due to illness may not return without submitting a medical release from his doctor.
|Prior Temporal Range status||absent|
|Condition||has medical approval|
An employee that is rehired by a company may have his prior service reinstated provided he remains actively employed for a period that equals or exceeds the period of time between being terminated and being rehired. The parameters provided for this example assume a binary comparison of two temporal ranges. A more generic expression would name the temporal comparison operator in a manner similar to the Temporal Association pattern. By recognizing this type of comparison (i.e. between the current and prior ranges) as a common specialization of the more generic case, the number of parameters may be reduced.
|Attribute Type||Employment Status|
|Prior Temporal Range status||terminated|
|Current Temporal Range status||active|
|Condition||active >= terminated|
The Entity State History business rule pattern is realized in the UML as a Constraint model element. The Constraint's Boolean expression is constructed from the pattern's parameters.