-
Language:
English
-
Language:
English
13.3. Working with POJOs
Procedure 13.1. Task
- Observe the example below:
public int getAge() { Date now = DateUtil.now(); // Do NOT do this return DateUtil.differenceInYears(now, birthday); }
- To solve this, insert a fact that wraps the current date into working memory and update that fact between
fireAllRules
as needed.