-
Enhancement
-
Resolution: Unresolved
-
Minor
-
6.4.0.Final
-
NEW
-
NEW
Proposal A) Old behaviour
@ProblemFactProperty public Person getPerson() {} // Person in WM @ProblemFactCollectionProperty public List<Person> getPersonList() {} // Each person in WM @ProblemFactProperty public List<Person> getPersonList() {} // List in WM @ProblemFactCollectionProperty public Person getPerson() {} // throws IllegalStateException
Disadvantage of proposal A): when a user use @ProblemFactProperty on a List<Person> by accident, his score rules on Person don't match and it's hard to figure out why.
Proposal C) Jiri Locker's proposal
@ProblemFactProperty public Person getPerson() {} // Person in WM @ProblemFactProperty public List<Person> getPersonList() {} // Each person in WM @ProblemFactProperty(extractItems = false) // extractItems is true by default public List<Person> getPersonList() {} // List in WM, instead of the persons
Advantage of proposal C): less is more
Same approach for @PlannignEntityCollectionProperty.
Backwards compatibility: The Collection annotations become deprecated. In case any one used @PlanningEntityProperty to put a List in the WM (not it's items), they need to add extractitems=true, so this is a 7.0 or 8.0 change as it does break backwards compatibility (with about 0 users...).
- relates to
-
PLANNER-793 Autodiscover problem facts without @ProblemFactProperty and @ProblemFactCollectionProperty annotations through flag on @Planningsolution (AKA deprecate AbstractSolution)
- Resolved