Details
-
Enhancement
-
Resolution: Obsolete
-
Major
-
None
-
6.5.0.Final
-
None
-
NEW
-
NEW
Description
I'd like to be able to do this:
accumulate( TaskAssignment($person : person, $duration : duration); $b : loadBalance($person, $duration) )
This loadBalance function basically does sqrt(sum(squared(sum($duration) per $person))), so it cannot be split up into 2 separate accumulate functions. This loadBalance of fairness function is very common for employee rostering, task assignment (incl jbpm), cloud optimization, etc, so we 'll provide it out of the box.
Internally, the compiler should do some syntactic sugar for DRL
$b : loadBalance($p, $d) => syntactic sugar => $b : loadBalance(new Object[]{$p, $d})
The AccumulateFunction would then get an Object[] instance:
public void accumulate(Serializable context, Object o) { Object[] value = (Object[]) o; ... }
It's ok that the AccumulateFunction is still complex as that's only coded once, but the use of that function is in a lot of user code and examples.
Attachments
Issue Links
- is incorporated by
-
DROOLS-1422 Make AccumulateFunction interface simpler and more powerful
- Closed