Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.6.0
-
None
-
Patch Available
Description
The current implementation of ScheuledRoutePolicy only supports one type of action (start,stop,resume,pause) for only one route. If, for example, you attempt to configure a CronScheduleRoutePolicy with a routeStartTime and routeStopTime, only the one will by handled because ScheduleRoutePolicy (super-class of CronScheduleRoutePolicy) only store one action and one route in the SchedulerContext:
protected void loadCallbackDataIntoSchedulerContext(Action action, Route route) throws SchedulerException {
getScheduler().getContext().put(SCHEDULED_ACTION, action);
getScheduler().getContext().put(SCHEDULED_ROUTE, route);
}
with the effect of creating two timers (one for startTime, the other for stopTime) that execute the same action (the last call to scheduleRoute).