Details
-
Bug
-
Resolution: Done
-
Major
-
jBPM 6.2.0.CR3
-
None
Description
In this scenario the clock is set at Thu Jan 08 11:38:30 CET 2015. I want to calculateBusinessTimeAsDate adding 4 days, so the expected result should be Wed Jan 14 11:38:30 CET 2015. It does work. If I set the property "business.holidays" to "13-01-2015", the result should be Thu Jan 15 11:38:30 CET 2015 (1 day later), but it remains in Wed Jan 14 11:38:30 CET 2015. The holiday is ignored. Seen also in v5.4.x
Test.java
public class Test { public static void main(String[] args) { final Properties props = new Properties(); props.put("business.holidays", "13-01-2015"); final Long fechaLong = 1420713510198L; // Thu Jan 08 11:38:30 CET 2015 BusinessCalendarImpl businessCalendarImpl = new BusinessCalendarImpl(props, new org.kie.api.time.SessionClock() { @Override public long getCurrentTime() { return fechaLong; } }); Date calculateBusinessTimeAsDate = businessCalendarImpl.calculateBusinessTimeAsDate("4D"); System.out.println("NOW: " + new Date(fechaLong)); System.out.println("THEN: " + calculateBusinessTimeAsDate); } }