Calendar Rules Problem

I am trying to set up Calendar rules so that my deadlines should move ahead on those days(mostly weekends). I made a calender rule and added it to my organization. In the due transition, i also added use calendar rules. Now if I am correct all participants in that organization should have their deadlines move to Monday and not Saturday, Sunday. Please guide me if I am correct. This is not working as I still see my deadlines on Saturday and Sunday
Edited by: haris on Jan 26, 2011 4:48 AM

Hi,
First set the calendar properly with Saturday and Sunday unchecked while declaring the calendar.
Then you have to have some logic to set the deadline so that it will skip the Saturday and Sunday.
Please find the logic below and do the necessary changes according to your requirement.
Method: setDeadline(startDate: Time, sla: Int, calendarName: String): (Input - Date of creation, SLA, calendar name)
//It will skip saturday, sunday and holiday that you defined in your calendar
CalendarRule.fetch(calendarName : calendarName, out calendarRule : calendarRule)
start as Time
memday as Time
start = startDate
memday = start
count as Int
count = 0
if sla > 0 then
     while count < sla do     
if (isHoliday(calendarRule, time : start) == false &&
isWorkDate(calendarRule, time : start) == true) then     
               count = count + 1
          end               
          start = start + '1d'     
end
     start = start - '1d'
end
return start
hope it help you.
Bibhu
Edited by: Bibhuti Bhusan on Jan 26, 2011 9:32 AM

Similar Messages

  • How to access calendar rules via java

    Hi to all,
    We have a process in which we need to set a Timer, but the date must be validated against Calendar Rules. We searched in forums, webs, documentation and we couldn't find a way to do this.
    I know it is possible to set an expiration date based on Business Calendar on a Human Task (deadline tab in Human task editor), but this is not what we need.
    We actually need a way to set a variable date in the process that can handle only business days. e.g.: 'now' + 2 business days.
    Right now we are setting the Timers with this expression from a Business Rule: Duration.from string("PT48H")
    Then I associate the business rule output with a Time type variable(deadlineTime) doing: 'now' + deadlineTime
    So right after that I can use the Time variable on a timer attached to the human tasks I need. * We need to use business rules because the customer may want to change the times accordingly to their needs through BPM Composer. *
    The problem is that this solution does not take into account Saturday and Sundays (holidays are a concern too).
    We need to set the expiration time to timers attached to human tasks, but the time should consider working days only. We consulted with experts from Oracle and told us that functionality is available in the PS 6 version. At the moment it is impossible to migrate to that version. I need to know how to access via Java APIs to the calendar rules for checking programmatically.
    JDeveloper version: 11.1.1.6
    Any suggestion?
    Thanks in advance
    Marcelo

    Hi Yarner,
    Once you have all your dll included in a jar and used the nativelib tag, you have to use, at the beginning of you application, the command System.loadLibrary to load all the dll you need. Including the ones called by the others you have direct access.
    The dll�s have to be explicitly loaded in the order they are called.
    For example: you use lib1.dll and lib2.dll. The lib1.dll needs lib0.dll.
    Even if you don't use lib0.dll directly, once its called by lib1.dll you have to put then in the order.
    System.loadLibrary("lib0.dll");
    System.loadLibrary("lib1.dll");
    System.loadLibrary("lib2.dll");
    I hope it may help you, good luck.
    Mario

  • Retrieving Calendar rule associated with role

    Hi,
    I want to retrieve the Calendar Rule associated with a Role or Organisation Unit using the API.
    Do anybody know the function which will return the Calendar rule associated with Organisation Unit or Role?
    Regards,
    Sachin

    We have to do 2 things:
    The first one is that we are trying to retrieve the correct navigation ID to call different OnAfterLogin PEI's depending on the Exp Def. We create one PEI class for each Exp Def and we name it with the navigation ID. For example com.mypackage.nav100.pei.MyLoginPEI100.
    iSubPortalID = ptSession.GetSessionInfo().GetCurrentUserCachedSubPortalInfo().GetNavigationScheme();
    ILoginActions currentNavPEI = (ILoginActions)(Class.forName("com.mypackage.nav" + iSubPortalID + ".pei.MyLoginPEI" + iSubPortalID)).newInstance();
    We have some rules based on URL's and we want to have the correct Exp Def Navigation ID.
    The second one is that on the OnAfterLogin PEI we redirect the user to a custom AS that performs some operations and at the end we want to redirect the user to his default page with this code:
    PTLoginHelper helper = new PTLoginHelper();
    redirect = (Redirect)helper.GetDefaultPageRedirect(redirect, m_ptSession, m_asOwner);
    And this has a similar problem. We are always redirected to the default page of the Exp Def associated with the user folder and not to the Exp Def that the user see depending on our rules.
    Do you understand?
    Thank you again!

  • Alternate way to implement Calendar Rules

    Hi All,
    We have a requirement to implement calendar rules for different regions. WE added dummy OU in our studio and tested. Since we have integrated with MSAD Microsoft Active Directory), we are unable to add OU.
    Is there any other way to implement Calendar rule restriction using PBL code? or is there any other alternative available??
    Kindly help me.
    Thanks
    Edited by: user12859640 on Sep 6, 2011 3:36 AM

    Enio,
    Realize you're confounded and probably a bit upset but you didn't explain exactly what your problem is. Before you reply though, here are a couple of things to ponder: did any of Apple's techies suggest that you archive all the address books to your HD and delete the address book database, reopen Address Book and reimport the archived files? Also, did any of your discussions with Apple touch on the idea of resetting the synch history on any of your computers and "reseeding" the database on .ME? And I'd definitely like to hear what problems you're having with calendars - I could write a book . Stay in touch.
    Mike

  • FIX FOR OUTLOOK CONTACT - CALENDAR SYNC PROBLEMS

    OK Guys. I have figured out the problem with Itunes not syncing the OUTLOOK CONTACTS & CALENDAR EVENT PROBLEM (For those who have this problem). So without further due....
    1) Go to Outlook/Tools/Option/Others/Advanced Options/ADDIN MANAGER
    2) Remove the check box in front of "OR Stuffit OL Extention" and click OK
    3)Go to COMS ADD IN and you should now be able to CHECK MARK the OUTLOOK ITUNES SYNC ADDIN.
    Click OK all the way back to OutLook AND SYNC.
    If it worked for you, kindly leave me good feedback. Happy 4th everyone.
    Philippe

    Let me complement my post with some info that might have help performing the above fix.
    I spend about 3 hours on the phone troubleshooting this issue with Apple Iphone team last night. Before I found the FIX myself, They had me do the following:
    (XP OS ONLY)
    Exercise # 1:
    Go to ADD/REMOVE PROGRAMS:
    Remove Itune software
    Remove all IPOD related software
    Remove all APPLE related software
    remove Quicktime
    reboot
    Reinstall Itunes.
    Exercise # 2:
    Reboot Iphone
    Exercise #3:
    Restore Iphone (Make sure there is nothing that you cannot get back on the Iphone before Restoring and make sure you have Internet connection as the Iphone is restored from
    Good luck

  • Calendar Rules in BPM10g

    Hello -
    Can we use Calendar rules and holiday rules to prevent / control the participants' activities and login into BPM workspace?
    Please share the use of Calendar and holiday rules.
    I think, following is just an introduction : http://download.oracle.com/docs/cd/E13154_01/bpm/docs65/studio/modules/organization/c_Calendar_Rules.html
    Thanks in advance !
    Justin.

    From the article it says:
    * Calendar rules define the work hours, time zone, and holiday rule assignment for organizational units.
    To prevent users logging in I believe you need to introduce Oracle Access Manager. Calendar rules is only for assignment of tasks.

  • How to edit working hours in the calendar rules

    Hi..
    Does anybody know how to change the working hours in the calendar rule editor as in mine case those working hours are already frozen.
    Ritu

    Got the answer............
    it just the game of arrow keys ;)

  • How to get SLA using Calendar rules?

    How can I add 24hrs to the time using the calendar rules? For Example, If the Monday's date is given I need to get Tuesday's date as SLA. If I give Friday's date I need to get Monday's date as SLA. I have tried using
    CalendarRule.computeDate(time,interval).
    CalendarRule.add(time,interval).It works fine for the first senario.but not for the second senario. Could please help me how to achive this. The above senario should also count the user defined holidays.
    Please help me with regards.
    Thanks in advance
    - Narasimha

    Hi,
    Plz write the following logic it will help you
    sla = 1;
    Time start;
    start = 'now';
    Int count;
    count = 0;
    if(sla > 0) {
    while (count < sla) {
    if(calendarRule.isHoliday(time : start) == false &&
    calendarRule.isWorkDate(time : start) == true) {
    count = count + 1;
    start = start + '1d';
    start = start - '1d';
    logMessage("inal Due Date for SLA (" + sla + " Day/s) is " + start.format("dd/MM/yyyy"));
    I have hard coded the start time as well as sla. Please make the necessary changes.
    Bibhu
    Edited by: Bibhuti Bhusan on Sep 22, 2010 3:35 AM

  • 11g Calendar Rule - how do you access it programmatically

    Hello All,
    We are using BPM 11g and we need to programmatically access the calendar rule setup for the organization in order to display default dates in ADF task flow using formula like: today + 14 business days.
    Has anyone done this on 11g?
    thanks,
    Vikram

    any ideas guys ?

  • 11g How to programmatically access Calendar Rules

    Hi guys,
    I use BPM 11g and I'm trying to programmatically access calendar rules configuration for the organization in order to display labor dates in ADF task flow using Simple Expression like: now + 2 business days.
    Has anyone done this on 11g?
    Thanks in advance!

    Hi,
    Do NOT use ExternalContext.getRequest(), but ExternalContext.getRequestMap().put() in the backing bean. As for the programmatic access, as mentionned it might be a scope issue. When is your managed bean code executed exactly?
    ~ Simon

  • Calendar Rules showing the same day holiday as well as working day

    Hi All,
    I am using OBPM 10.3.
    I have created a holiday rule say "holi_rule" and declared a user defined holiday. I have created a Calendar rule and set "holi_rule" as holiday rule in calendar rule.
    When I am trying the below code
    calendarRule = Fuego.Lib.CalendarRule.fetch(calendarName : "India_Calendar_Rule");
    workDate = calendarRule.isWorkDate(time : timeObj.time);
    logMessage( " Is working day : "+workDate);
    boolean isHoliday = calendarRule.isHoliday(time : timeObj.time);
    logMessage( " Is holiday day : "+isHoliday );
    timeObj.time is a input which I getting from the BPM presentation object."Both the log messages are displaying as true. I am not sure why both are displaying as true. Can any one help me to fetch the user defined holiday as holiday?
    Thanks in advance
    -Narasimha

    Hi,
    I hope the timeObj.time that you have defined/fetching from presentation is a holiday which you have defined in Holiday Rule.
    Accoring to the Holiday rule it is a holiday but according to the working day that you have defined in Calendar Rue is also a working day.
    So you should make use of thest two logic to find out an actual working day
    if(calendarRule.isWorkDate(time : timeObj.time) == false && calendarRule.isHoliday(time : timeObj.time) == true) {
    //Put your logic here
    Bibhu

  • Update rule problem - validation of "sales/cost w/ tax" keyfigure

    BW Gurus,
        Hi to all, i have this update rule problem at "sales/cost w/tax" keyfigure here is the senario.
        Our Goverment mandatory implemented an additional 2% tax from the original 10%, this will affect our report on sales, and also the BW "sales/cost w/ tax" key figure.
        My question is How can I validated the effectivity of the new tax? i have tax 10% from previous sales and 12% on the current sales. What "date field" can I use to validated this. I am using /BIC/CS2LIS_13_VDITM stucture to get the data i need.
    Thanks in Advance
    Joven

    Hi,
    Till to day how are extracting the data for tax(original 10%) is it available directly in 2LIS_13_VDITM ?
    Usually all taxes( condition types) can be extracted by the data source 2LIS_13_VDKON.Discuss with SD team, they may give the condition type used for different taxes.
    With rgds,
    Anil Kumar sharma .P

  • Multiple calendar rules

    In BPM standalone 10g, I can add only one calendar rule to a organization group. But I can add more than one calendar rule to roles. If I add two calendar rule to all roles for the same location (calendar rule A: Sunday and Saturday are non working day. calendar rule B: all days are working days), which one has the priority?
    Thanks.

    Hi,
    naidu c wrote:
    > i found one FM FACTORYCAL_WRITE_DOCUMENT, but here we can update only one Calendar at once.
    >
    > i tried to update form the BDC using transaction SCAL, here the issues is that to update multiple calendars we have to do from the begining for each calendar.
    What is the issue with calling the FM or executing the BDC, several times?
    Sandra

  • Mail rules problem

    Hi everyone
    I'm using a MacBook Pro 10.7.4, I'm having rules problems in Mail.
    I run a Graphic design and photography company, I have folders set up for 20-30 clients, when emails come in from a certain client they go straight to that client folder.
    Equally, I have a 'Personal' folder, emails from friends should go to there.
    Recently though for some reason ALL of my sent items have started to flood into a client folder, a lot of my client emails are going to a general folder and personal emails are not going to the right folders.
    Does anyone have a second to advise what might be causing this, or even better - a potential fix for this problem, it's making me a little crazy and adding to my workload daily.
    Hope to hear from you.
    best regards
    Alex

    hello. When you say the sent items flood a client folder, do you mean, duplicates, or the actual sent mail goes there?
    I have been trying to look into why periodically, things I send go into drafts folder.
    Sounds like an issue that needs updating.. maybe we should "report bug to apple" maybe..

  • "All-Day" Calendar Rules?

    I am using my iPhone 5s (iOS 7.1.1) with an Outlook Exchange Server.  When I go to the Calendar App and view the list of daily activities, I noticed some weird rules that the calendar uses which I can't figure out.  Here is what I mean:
    If an appointment is all-day, then the list view shows it as all-day.  If the number of hours of the appointment is under 4 hours, it will show it in list view as the time.  For example, it will say, 3:30PM - 5:30PM.  If the appointment is more than 4 hours but during the day, it seems to show the hours but if the appointment is at night, it will show the appintment as "all-day" but then once I click on it to view details, it says the appointment is actually from 4-8PM.  But then on weekends it seems to show hours without doing the all-day thing, unless of course it is an all-day appointment and then it will show it as all-day.
    Anyone else noticing this?
    Does this related to my workday setting in Outlook?  I currently have my work hours set to 8-5PM.  Any chance someone knows the rules that the cal app follows and can share them?
    Appreciate the help!

    So just when I beginning to think 10.9.4 "fixed" this, there still seems to be issues. It does seem that the calendar notifications are at least not stepping on each other as much. By that, I mean that sometimes in the past there could be a notification lost by a new notification even though the max number of 10 has not been reached. That "lost" one could be a notification at the bottom of the FIFO stack or, curiously, one in the "middle"  or "top" of the stack. Weird.  Saw the latter twice today.
    However, I am always listening to iTunes when I am working on my machine. iTunes is also sending notifications of the next thing it is playing. It seems as if when that new iTunes notification comes about the same time as the next calendar notification, the previous calendar notification is over-written by calendar. A clue? (As I wrote that, calendar just over-wrote a notification even though the max stack of 10 wasn't reached and iTunes hadn't sent a notification - what the heck?)
    Still not sure if the "sleep problem" is fixed (when notifications are issued during sleeping, notifications are lost much below the max value of 10 - overall as if it loses how big the FIFO stack is).
    When an app acts seemingly randomly, it is very irritating.

Maybe you are looking for

  • Payables Open Interface Program Source Problem

    Hello All, I am trying to import invoice using "Payable Open Interface Program". I have two Sources from which I am uploading invoices. Lets say the Sources be A and B. (in the lookup code i have added A and B under Source lookup type). Now the probl

  • Win XP Conversion to Win 7 Pro

    Have several networked Dell desktops I need to upgrade to Win 7 Pro. I've run update advisory on several PC's and every time it tells me I need to do a custom install, which requires me to reload all my programs--what a bummer. Given that why is ther

  • I want to get the information of the attachment without get the whole body

    POP3 server: MimeMultipart mp=(MimeMultipart) message[0].getContent(); int count=mp.getCount(); //the server deliver the whole attachment when I use mp.getCount Part part=mp.getBodyPart(0); //when I use getBodyPart the server deliver the whole body t

  • What type of cable do I have to use for use my iPad with a normal priner ?

    I need to know what type of cable I have to use to install my regular printer to my iPad

  • Selection screen parameters

    Dear All, I need some code for the the following issue: I have 1 selection screen which has 2 parameters vkorg and vtweg.So whenever I provide some input to  vkorg the input value for vtweg should automatically be displayed on the selection screen(ba