Contrasting time-qualified rules, DateTime circumstances, and historical processing |
PRPC offers three separate features that can cause processing to be dependent on a date or time value. Which of these to apply to best meet an application need depends on the nature of the rules affected and the requirements and environment of the application:
Both date range and datetime circumstance rules are specialized versions of a base rule that only execute when certain time conditions are met.
Date range circumstances (sometimes referred to as "time qualified" rules) evaluate the current system time against a window of time specified in the Start Date field, End Date field, or both fields.
DateTime circumstances (sometimes referred to as "As-of date" rules) evaluate the value of a DateTime property against a specified DateTime value.
The historical processing capability applies to an entire ruleset version, not to a rule. This capability is unrelated to the concept of circumstancing and base rules.
With careful advanced design, this feature allows an application (for the current requestor) to operate according to rules as they were on a specific past date. Such processing is useful to reconstruct past behavior or apply past policies.
Operation depends on the values in the Effective Date field on the Security tab of theruleset form.
To turn on this feature, a requestor session calls the setRuleSets() PublicAPI function and identifies a cutoff date. Rules in ruleset versions with an effective date later than that date are thereafter excluded from processing for the duration of the session.
For example, assume that ruleset version ALPHA:04-15-05 fixes a specific application fault present in version ALPHA:04-15-04 and has October 15, 2004 as the effective date.
A user with access to version 04-15-05 does not experience the fault, before or after that date. But if that user enables historical processing with October 14, 2004 as the cutoff date, all the rules in ruleset version 04-15-05 are no longer available for the duration of this user session, and the fault may be recreated.
Similarly, consider a sequence of tax rules with corresponding ruleset versions, each with an effective date. During 2006, taxes can be computed following 2003 rules, by using historical processing. This works only when all the relevant computations are in the ruleset versions needed.
The current system date and date computations using standard functions aren't affected by historical processing.
NOTE: Historical processing affects the selection of rules, but doesn't cause any system date values to be changed. The history of an object reflects today's date, with no backdating.
About RuleSet Versions
Completing the Specialization Form Understanding the Date, Time, and DateTime property types |