Reasoning over time and events

Write rules that contain time-aware business logic to reason over events and other time elements such as periods, durations, and current time.

In rules, time operators can be used to calculate useful values for your business, such as an elapsed time, a time window, or a window of opportunity. An example of a time window is the period before and after a desired departure time that a customer might accept a flight if the ideal flight is not available. A window of opportunity is a short time period during which an otherwise unattainable opportunity exists. After the window of opportunity closes, the opportunity ceases to exist. Since good deals on real estate, business offers, and so on, do not exist forever, the window of opportunity is the ideal time to act.

Most of the examples of rules in this section are based on the following business model Example of an airline business model.