Is your feature request related to a problem? Please describe.
Currently the following is invalid to do since a variable cannot be used as a group source:
@PlanningListVariable
List<Value> values;
@ShadowSources("values[].declarativeVariable")
public Integer maxDeclarativeVariableSupplier() {
return values.stream().map(Value::getDeclarativeVariable).max(Comparator.naturalOrder()).orElse(null);
}
Describe the solution you'd like
@PlanningListVariable and @InverseRelationShadowVariable should be able to be used as a group source.
Describe alternatives you've considered
Calling the method inside a constraint (although that loses caching).