2 Replies Latest reply on Jun 10, 2010 4:13 AM by Jaber C. Mourad

    BusinessCalendar use case

    Jaber C. Mourad Novice



      I can't find some docs to use business calendar form JBpm 4.3...


      My use case is quite simple, one of my process purpose is create some vacancy request.


      I would provide some information to calculate the number of vacancy days and business calendar has the info...


      Is it possible to access to a service using business calendar data and compute number or days with start date/end date ?



        • 1. Re: BusinessCalendar use case
          Michael Wohlfart Expert

          The BusinessCalendar interface has the methods

          Date add(Date date, String duration);

          Date subtract(Date date, String duration);

          so its more like the other way around, instead of getting the number of business day between start and end date you have a start date then add the number of days and get an end date.


          duration syntax is in the java docs:

          duration = part [',' part | 'and' part]*
          part = number ['business'] unit
          number = (0..9)+
          unit = (y|year|years|month|months|w|week|weeks|d|day|days|h|hour|hours|min|minute|minutes|s|sec|second|seconds|milli|millis|millisecond|milliseconds)


          • 2. Re: BusinessCalendar use case
            Jaber C. Mourad Novice

            ok, thanks, it doesn't match to my need, but I will use it for other purpose .