Optimize 10.11 | webMethods Optimize Documentation | Using webMethods Optimize | Defining Rules | Creating Rule Expressions | Reading Day Example
 
Reading Day Example
The following example shows a Reading Day Date-Time expression. Reading Day can be used in either a Simple expression or a Date-Time expression. If used in a Date-Time expression, the Reading Day is the day when the rule evaluation occurred. If used in a Simple expression (which is tied to either an event or KPI reading), the Reading Day is the day when the event or KPI Reading occurred. When processing rules in real-time, there is no difference between the two usages; however when performing rule re-generation, the Date-Time expression usage will not evaluate as expected since the evaluation day would be the current day rather than the day when the event or KPI reading day occurred.
Reading Day can be compared to either a Time selection, such as Monday or WorkDay, or a number literal that matches the day of the week. The example that follows shows a compound expression that uses a simple KPI Value expression and an embedded Date-Time Reading Day expression. The rule fires when the KPI value is greater than 300 MB and the Reading Day is a workday and the time of day is before 5:29 AM.
Reading Day example