Tuesday, May 18, 2010

Calculate Commit Time using Business Hours

 This post is a supplement to one of my previous post Calculate Business Hours

I had one requirement where I need to calculate the Date Time, user has to finish the work.
The time taken should not include the Holidays. It should only consider Working Hours to calculate the time taken.

As I told you in my previous post that the Business Service 'FS Holiday API Service' provides 3 methods:
   1. GetElapsedBusinessTime
   2. GetResponseTime
   3. IsHoliday

GetElapsedBusinessTime: It majorly requires input as the below:
  • Service Calender Id
  • Start Time
  • End Time
As the result it provides you the time spent in between the Start and End Time excluding Holiday and including only working hours.
Note: This method has a bug in Siebel 8.1.1.2 (21215):
Defined our Schedule from Sunday to Thursday, time from 7 AM to 7 PM. The timezone is (GMT+04:00) Abu Dhabi, Muscat. It is observed that whenever there is data like:
Start Time: 4/15/2010 10:31:34
Schedule Time Zone: (GMT+04:00) Abu Dhabi, Muscat
Calender Id: <>
End Time: 4/18/2010 08:31:33
Time Unit: Hours.
And the end time is coming on Sunday. like April 18, 2010, April 25, 2010 or 2 May 2010.
It is failing and crashing the server.

GetResponseTime: It majorly requires input as the below:
  • Service Calender Id
  • Start Time
  • Response Time
As the result it provides you the Date time or Commit Time, for example time till which user has to finish the work excluding Holiday and including only working hours.

IsHoliday: 
  • Calender Id
  • Date Time
As a result, it gives if that Date Time is lying on Holiday.

Oracle does not provide any OOTB functionality in OBIEE 10.1.3.4.1 (reporting) to cater this requirement. Our OBIEE team has to write a Procedure.

Sharing is the power.

1 comment: