Hi all,
I am using /OptaPlanner/ ver. *6.0.Beta3*.
And I try to call one rule for preparation purposes. I try 3 options:
*1)* By defining additional problem facts /EmployeeAssignment/ for each
employee. Here I am trying to change only its property like this:
/rule "First rule"
salience 1
when
$employeeAssignment : EmployeeAssignment($employee : employee)
accumulate
(
$request : Request(assignedTo == $employee, $points : points),
$assignedPoints : sum($points)
)
then
$employeeAssignment.setAssignedPoints($assignedPoints.intValue());
update($employeeAssignment);
end/
That variant compiles well, but did not even start (e.g. when I try
benchmark it stops on "Warming up started" message and did not do anything).
*2)* Same with /modify($employeeAssignment) {...}/
*3)* The last one is with /insertLogical/. I did not use here
/EmployeeAssignment/ as additional problem fatcs, but just use:
/then
insertLogical(new EmployeeAssignment($employee, $assignedRequests,
$assignedPoints.intValue()));
end/
It works, but with low performance (examples were simplified).
Can you tell me what can be wrong with the 1) and 2) ?
Thank you for your time!
--
View this message in context:
http://drools.46999.n3.nabble.com/modify-and-update-do-not-work-in-rules-...
Sent from the Drools: User forum mailing list archive at
Nabble.com.