4 Replies Latest reply on Feb 28, 2006 8:28 AM by Tom Baeyens

    Spelling mistake in jbpm.business.calendar.properties file.

    Konstantin Kolev Newbie

      I am not sure if this could be considered some important issue but since I mentioned it I will report it. There is spelling mistake in the

      in the days of week section:
      must be
      One more question aside of this. Is the parsing of duration expressions like
      2 business days
      correct in jBPM 3.1? I think it's not working properly and I will try to check what exactly the problem is.

      Thanks in advance for any replies!


        • 1. Re: Spelling mistake in jbpm.business.calendar.properties fi
          idris yuce Newbie

          i think there is a problem with business calendar or we missing some parts.
          When i run the following code i got the following results respectively althoug i didnt make any change to jbpm.businness.calendar.properties file.
          It doesnt care about day parts for afternoons (12:30-17:00) it assumes business day finishes after 12:00 i think. i didnt check the code but i think it works so,

          Calendar calendar = BusinessCalendar.getCalendar();
          calendar.set(Calendar.YEAR, 2005);
          calendar.set(Calendar.MONTH, Calendar.APRIL);
          calendar.set(Calendar.DAY_OF_MONTH, 7);
          calendar.set(Calendar.HOUR_OF_DAY, 11);
          calendar.set(Calendar.MINUTE, 15);
          calendar.set(Calendar.SECOND, 0);
          calendar.set(Calendar.MILLISECOND, 0);
          Date quarterPastTwelve = calendar.getTime();

          Date fiveBusinessHoursAfterQuarterPastTwelve =
          businessCalendar.add(quarterPastTwelve, new Duration("2 business hours"));


          Thu Apr 07 11:15:00 EEST 2005
          Fri Apr 08 10:15:00 EEST 2005 (that was suppose to be Thu Apr 07 13:45:00) according to dayparts defined in properties file.

          when i dont use 'business' for duration it works correctly.
          is it a bug? or missing something?

          • 2. Re: Spelling mistake in jbpm.business.calendar.properties fi
            idris yuce Newbie

            sorry for variable names confusion, i got this snippet from test suite ,i change values of variables but didnt change variable names for Dates.

            • 3. Re: Spelling mistake in jbpm.business.calendar.properties fi
              Konstantin Kolev Newbie

              I think you are quite right. There is something wrong with the second daypart because when it comes to it things got messed.
              But there is more than that. I've just created a task started at

              2006-02-28 13:16:16.767
              having duration of 7 business hours. And the end date was correctly calculated i.e.
              2006-03-01 11:16:00.000

              After that I have another task that started at
              2006-02-28 13:18:14.327
              but to my big surprise its end date was calculated to
              2006-03-06 13:18:00.000
              which is far, far away from the truth :( So when it comes to the afternoon day part something breaks. Unfotunatelly there is no any heuristic dependency between the wrong calculations that can help for defining the problem.
              I've been writing posts for the wrong calculations of the durations a long time ago and as far as I remember the answer was that it would be fixed in the later versions. I am not sure if there is a jirra issue about this though :(
              Otherwise if the word business is omitted everything goes smooth.