The DEAT Business Rule Pattern Language

Russell R. Hurlbut, Ph.D.

Previous | Table of Contents | Next

Rule Pattern 5: Default Value

Problem Establishing an Initial Value if Unknown

If a value for an attribute is unknown, certain assumptions may often be made so that processing may proceed. In many situations, the presence of a value merely indicates a preferred method of handling a particular workflow. Therefore, processing should not be interrupted simply because this preference is not known.

Solution

Assigning a default value for an attribute provides a way for a system to proceed with processing of a workflow. Processing may elect to take a worst case scenario approach. In this case an additional workflow scenario may be activated to adjust the value when it is known. For some scenarios, the assignment may not be a constant. Instead, a method is used to determine the value that should be assigned.

Example Mailing Address

An industry trade publication offers free subscriptions to professional that complete their application. Both an office and home address are provided, although only the office address is required. If both addresses are completed, a checkbox indicates which addressed should be used for mailing the publication. If neither is checked, the office address is used.

 

Mailing Address Parameters and Case Values

Parameters:

Attribute

mailing address

Type

mailing address type {office, home}

Default office

Case:
Input Attribute office address - known
Attribute home address - known
Attribute mailing address - unknown
Output Attribute mailing address - office


Example Hotel Rooming Assignment

A conference is offering hotel accommodations as part of its package. An attendee may specify his rooming partner; otherwise one will be assigned. If there are an odd number of attendees, one will be selected to room alone. The remaining unmatched will be assigned based on certain similar attributes, such as employer, age, position, etc. In this example, the roommate preference is not made, so the assignRoomsMethod default behavior is invoked to make the assignment.

Hotel Rooming Assignment Parameters and Case Values

Parameters:

Attribute

roommate

Type

registration Id

Default assignRoomsMethod

Case:
Input Attribute roommate - unknown
Output Attribute roommate - 251


UML Representation and Related Patterns

The Attribute Default Value business rule pattern maps to the defaultValue attribute of the Parameter model element. This pattern provides specification for the Uninterpreted type with the defaultValue attribute resolved through the body attribute of the Expression model element.

UML Representation of Default Value Pattern


Previous | Table of Contents | Next

Copyright 1998 Expertech.Ltd. All Rights Reserved.
Legal