4 Replies Latest reply on Feb 25, 2006 1:12 PM by Ronald van Kuijk

    Timer duedate always set to  yyyy-mm-dd 09:01:00

    Mennen Newbie

      It's weird..

      I set a timer on a state node like this:

      <state name="node1">
       <timer duedate="1 business minute" transition="choix2" /> <transition name="choix1" to="task2"></transition>
       <transition name="choix2" to="task3"></transition>
       </state>
      


      And the duedate in the database is giving me 2006-02-24 09:01:00, when it's supposed to give me : 2006-02-24 5:23:00 (time now + 1 min)

      Did anyone get this problem before?

      Am i missing something here?

      Thanks in advance,


        • 1. Re: Timer duedate always set to  yyyy-mm-dd 09:01:00
          Mennen Newbie

          I don't know if it's a bug or not, but it seems to work when i take the 'business' keyword off..
          so the duedate becomes

          duedate = "1 minute"
          instead of
          duedate = "1 business minute"


          I checked the userguide, and here is what I found:
          14.1. Duration
          A duration is specified in absolute or in business hours. Let's look at the syntax:
          
          <quantity> [business] <unit>
          


          here's the link: http://docs.jboss.com/jbpm/v3/userguide/businesscalendar.html#duration

          Maybe it's just a little bug, or maybe an error in the documentation after all

          • 2. Re: Timer duedate always set to  yyyy-mm-dd 09:01:00
            Ronald van Kuijk Master

            if the businessday is 0900-1700, currently (0523pm, 1723) the businessday has ended and starts again at 0900 tomorrow so 0901 is exactely one business minute then. The date is also 2006-02-24 so that is tomorrow. You probably copied the date is should be, since that imo has to be 2006-02-23 5:23.

            So behaviour is excately as expected (imo)

            • 3. Re: Timer duedate always set to  yyyy-mm-dd 09:01:00
              Mennen Newbie

              Thank you for your reply kukeltje,

              Indeed i meant that the date should be 2006-02-23, i wrote 24 as a mistake..

              I did not know the business day ends 17h, so thanks for the info.. it all makes sense now :)

              • 4. Re: Timer duedate always set to  yyyy-mm-dd 09:01:00
                Ronald van Kuijk Master

                Mennen,

                The configuration of the businessday is in a property file. jbpm.cfg.xml contains this line:

                 <string name="resource.business.calendar" value="org/jbpm/calendar/jbpm.business.calendar.properties" />
                


                You can configure it anyway you like it, but currently it is

                hour.format=HH:mm
                #weekday ::= [<daypart> [& <daypart>]*]
                #daypart ::= <start-hour>-<to-hour>
                #start-hour and to-hour must be in the hour.format
                #dayparts have to be ordered
                weekday.monday= 9:00-12:00 & 12:30-17:00
                weekday.thuesday= 9:00-12:00 & 12:30-17:00
                weekday.wednesday= 9:00-12:00 & 12:30-17:00
                weekday.thursday= 9:00-12:00 & 12:30-17:00
                weekday.friday= 9:00-12:00 & 12:30-17:00
                weekday.saturday=
                weekday.sunday=
                
                day.format=dd/MM/yyyy
                # holiday syntax: <holiday>
                # holiday period syntax: <start-day>-<end-day>
                # below are the belgian official holidays
                holiday.1= 01/01/2005 # nieuwjaar
                holiday.2= 27/3/2005 # pasen
                holiday.3= 28/3/2005 # paasmaandag
                holiday.4= 1/5/2005 # feest van de arbeid
                holiday.5= 5/5/2005 # hemelvaart
                holiday.6= 15/5/2005 # pinksteren
                holiday.7= 16/5/2005 # pinkstermaandag
                holiday.8= 21/7/2005 # my birthday
                holiday.9= 15/8/2005 # moederkesdag
                holiday.10= 1/11/2005 # allerheiligen
                holiday.11= 11/11/2005 # wapenstilstand
                holiday.12= 25/12/2005 # kerstmis
                
                
                business.day.expressed.in.hours= 8
                business.week.expressed.in.hours= 40
                business.month.expressed.in.business.days= 21
                business.year.expressed.in.business.days= 220
                


                Ronald