I tried something like this in the Main application however without any success -
@Bean
InitializingBean setCalender(
final ProcessEngineConfigurationImpl processEngineConfiguration) {
return new InitializingBean() {
@Override
public void afterPropertiesSet() throws Exception {
Clock clock = processEngineConfiguration.getClock();
System.out.println("\n\n\n\n+++++++++++++++++\n\n\n\n\n"
+ clock.getCurrentTime() + "\n\n\n\n+++++++++++++++++\n\n\n\n\n");
clock.setCurrentCalendar(new GregorianCalendar(2015, 0, 1));
MapBusinessCalendarManager mapBusinessCalendarManager =
new MapBusinessCalendarManager();
mapBusinessCalendarManager.addBusinessCalendar(
DurationBusinessCalendar.NAME, new DurationBusinessCalendar(clock));
mapBusinessCalendarManager.addBusinessCalendar(
DueDateBusinessCalendar.NAME, new DueDateBusinessCalendar(clock));
mapBusinessCalendarManager.addBusinessCalendar(
CycleBusinessCalendar.NAME, new CycleBusinessCalendar(clock));
processEngineConfiguration
.setBusinessCalendarManager(mapBusinessCalendarManager);
Clock clock1 = processEngineConfiguration.getClock();
System.out.println("\n\n\n\n+++++++++++++++++\n\n\n\n\n"
+ clock1.getCurrentTime() + "\n\n\n\n+++++++++++++++++\n\n\n\n\n");
}
};
}