[jboss-jira] [JBoss JIRA] (JBRULES-3472) Planner: Custom move implementations shouldn't need to call before and after
Geoffrey De Smet (JIRA)
jira-events at lists.jboss.org
Fri Apr 20 03:20:30 EDT 2012
Geoffrey De Smet created JBRULES-3472:
-----------------------------------------
Summary: Planner: Custom move implementations shouldn't need to call before and after
Key: JBRULES-3472
URL: https://issues.jboss.org/browse/JBRULES-3472
Project: Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: drools-planner
Reporter: Geoffrey De Smet
Assignee: Geoffrey De Smet
Is this idea feasible?
We merge
- ScoreDirector.beforeVariableChanged(Object entity, String variableName)
- ScoreDirector.afterVariableChanged(Object entity, String variableName)
Into
- ScoreDirector.afterVariableChanged(Object entity, String variableName, Object oldValue, Object newValue)
Then, in a custom Move.doMove() implementation we need to call neither because Planner can figure it out:
- Call Move.getPlanningEntities() before calling doMove(), which returns all entities
- For each variable on every entity:
-- If the value before and after has changed, notify the ScoreDirector
What about Move's that add or remove entities?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list