Assign tasks automatically when vacation set for a user

Hi,
I've a requirement where user can set the vacation period and rules. When the vacation period starts, all the tasks already assigned to him should get REASSIGNED AUTOMATICALLY to the other user that we configured in the vacation rule. How can I achieve this? Please suggest me some ideas.
Thanks

Hi Bill,
I am able to reassign/delegate the task to a SINGLE user programmatically using the below code.
private void vacationTask(String taskAction) {
String errorMessage = "Below users are not valid: ";
boolean isFirstInvalidUser = true;
FacesContext facesContext = FacesContext.getCurrentInstance();
FacesMessage facesMessage = null;
try {
String contextStr = ADFWorklistBeanUtil.getWorklistContextId();
IWorkflowServiceClient wfSvcClient = WorkflowService.getWorkflowServiceClient();
ITaskQueryService querySvc = wfSvcClient.getTaskQueryService();
ITaskService taskService = wfSvcClient.getTaskService();
IWorkflowContext ctx = querySvc.getWorkflowContext(contextStr);
String loggedInUser = ctx.getUser();
List queryColumns = new ArrayList();
queryColumns.add("TASKID");
queryColumns.add("TASKNUMBER");
queryColumns.add("TITLE");
queryColumns.add("OUTCOME");
List tasks = querySvc.queryTasks(ctx,queryColumns,null,ITaskQueryService.AssignmentFilter.MY,null,this.getTaskPredicate(),null,0,0);
ITaskService taskSvc = wfSvcClient.getTaskService();
for(int i = 0 ; i < tasks.size() ; i ++) {
Task task = (Task)tasks.get(i);
String title = task.getTitle();
String taskId = task.getSystemAttributes().getTaskId();
String userInputList = null;
String[] usersList = null;
if(this.getUserToAssign().getValue() != null) {
userInputList = (String) this.getUserToAssign().getValue();
usersList = userInputList.split(",");
} else {
facesMessage = new FacesMessage("No users list provided. Please provide atleast one userId to reassign the task(s). ");
facesContext.addMessage(null, facesMessage);
return;
for(int j=0; j<usersList.length; j++) {
String userToAssign = usersList[j];
userToAssign = userToAssign.trim();
if(userToAssign!=null) {
UserBean userBean = new UserBean();
boolean isUserValid = userBean.isValidUser(userToAssign);
if(isUserValid) {
List<TaskAssignee> assignees = new ArrayList<TaskAssignee>();
TaskAssignee assignee = new TaskAssignee(userToAssign, IWorkflowConstants.IDENTITY_TYPE_USER);
assignees.add(assignee);
if(taskAction.equals(TASK_ACTION_REASSIGN)) {
taskSvc.reassignTask(ctx, taskId, assignees) ;
this.getConfirmMsg().setValue("The task(s) have been reassigned");
else if(taskAction.equals(TASK_ACTION_DELEGATE)) {
taskSvc.delegateTask(ctx, taskId, assignees);
this.getConfirmMsg().setValue("The task(s) have been delegated");
} else {                       
if(isFirstInvalidUser)
errorMessage = errorMessage + " " + userToAssign;
else
errorMessage = errorMessage + ", " + userToAssign;
isFirstInvalidUser = false;
if(!isFirstInvalidUser) {
facesMessage = new FacesMessage(errorMessage);
facesContext.addMessage(null, facesMessage);
} else {
this.getConfirmationPopup().show(new RichPopup.PopupHints());
catch (Exception e) {
//Handle any exceptions raised here...
System.out.println("Caught workflow exception: "+e.getMessage());
But, when I supply multiple uses separated by comma(,), the tasks are being assigned to the last user ONLY. Any idea why its happening.
Thanks.

Similar Messages

  • How to know whether a vacation rule is set for a user

    Hi,
    How to know whether a vacation rule is set for a user or not in the BPM process. Can anyone help me in this.
    Thanks,

    In Linux a user has to have read permission on a file to even see that it exists. As a result, if a user (or a group to which they belong) doesn't have read access to the file File.exists() will return false. Windows which doesn't have as tightly controlled access to files will admit that a file exists whether it can be read or not.
    PS.
    This is proof that I should never answer a question off the top of my head when I haven't had my red bull yet. This is wrong. You will be able to see it if you have read and execute on the directory.
    thumps self in head
    Message was edited by:
    puckstopper31

  • In weblogic server when I Setting Up a User and Tablespace for the Server M

    In weblogic server when I Setting Up a User and Tablespace for the Server Migration Leasing Table in Sql Plus I got an error. ORA-00972: identifier is too long

    Refer: How to: Grant User Access to a Report Server (Report Manager), but this gives a step-by-step procedure for
    adding users who are a part of the Domain. In your case you are trying to add users who are not a part of the domain, meaning, you are trying to create users only specific to Reporting Services, am I right?
    But Reporting Services either relies on AD to authenticate the users, or you can create a custom-authentication extension to authenticate the users.
    In your case, you might need use a custom security extension, and use that to create/delete/modify users. Check the Forms authentication Sample here:
    http://msftrsprodsamples.codeplex.com/wikipage?title=SS2008%21Security%20Extension%20Sample&referringTitle=Home
    Other references:
    Implementing a Security Extension
    How to: Configure Custom or Forms Authentication in Reporting Services
    Hope this helps
    Chaitanya( Twitter |
    Blogs )
    Any documentation bug? Tell us about it at
    Connect. Please feel free to add any community comments in any of the MSDN/technet articles.
    This posting is provided "AS IS" with no warranties, and confers no rights.
    The next CTP for SQL Server Code Name "Denali" is coming soon.
    Sign up now to be notified of the next CTP release.

  • My MacBook pro 2012 Mountain Loin 8.2 don't clear the inactive memory automatically when memory needed for other program so I get page outs.

    My MacBook Pro 2012 Mountain Loin 8.2 doesn't clear the inactive memory automatically when memory needed for other program so I get page outs. There are much inactive memory when page outs. Why my mac does this?

    That's completely normal. If other programs require memory then the system will reallocate Inactive RAM as needed. Page Outs don't mean anything.
    About OS X Memory Management and Usage
    Reading system memory usage in Activity Monitor
    Memory Management in Mac OS X
    Performance Guidelines- Memory Management in Mac OS X
    A detailed look at memory usage in OS X
    Understanding top output in the Terminal
    The amount of available RAM for applications is the sum of Free RAM and Inactive RAM. This will change as applications are opened and closed or change from active to inactive status. The Swap figure represents an estimate of the total amount of swap space required for VM if used, but does not necessarily indicate the actual size of the existing swap file. If you are really in need of more RAM that would be indicated by how frequently the system uses VM. If you open the Terminal and run the top command at the prompt you will find information reported on Pageins () and Pageouts (). Pageouts () is the important figure. If the value in the parentheses is 0 (zero) then OS X is not making instantaneous use of VM which means you have adequate physical RAM for the system with the applications you have loaded. If the figure in parentheses is running positive and your hard drive is constantly being used (thrashing) then you need more physical RAM.
    Adding RAM only makes it possible to run more programs concurrently.  It doesn't speed up the computer nor make games run faster.  What it can do is prevent the system from having to use disk-based VM when it runs out of RAM because you are trying to run too many applications concurrently or using applications that are extremely RAM dependent.  It will improve the performance of applications that run mostly in RAM or when loading programs.

  • Default account setting for this user is incomplete

    Hi,
    I have created a user and gave rights(connect and resource) to that user. i have logged in and when i trying to open form module im getting a message.
    default account setting for this user is incomplete. Contact system administrator
    How to resolve this?
    skud.

    default account setting for this user is incomplete. Contact system administratorThis is an application error not an Oracle Forms error. Contact your system administrator to determine what is missing from the user account you created.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Form setting for perticuler user

    Hi Friends,
    how to fix form setting for perticuler user.
    Thank you
    saman

    Dear Saman,
    If you want to set form setting for particular user than first gave him authorized for form setting, and than log on through particular user and than open the document (PO,SO.DO,A/R,A/P)and set the form.
    if you want the copy form setting form of particular user than log through user and go -to  Admin-setup-genaral-User and copy the form setting.
    Regards
    Mangesh Pagdhare

  • Can I have automatic e-mail setting for ADDM and AWR reports??

    Can I have Automatic e-mail settings for all my AWR and ADDM reports so I don;t have to run the reports all the time but they can be sent over to my mailbox and I can review them, if at all I can do that then can I bound them to a particular time frame where I can recieve only those reports durin the peak usage of my database.
    thanks

    Hi Rohan,
    Can I have Automatic e-mail settings for all my AWR and ADDM reports so I don;t have to run the reports all the time but they can be sent over to my mailbox and I can review them,You bet! I do it for all of my databases:
    1 - Use a cron (or preferably dbms_scheduler) to schedule the awrrpt.sql execution, directing the report to a fixed file location (e.g. /tmp).
    2 - As step 2 from the scheduled task, direct the report as input to sendmail:
    For Windows:
    http://www.dba-oracle.com/t_e_mail_interface_windows.htm
    For Linux:
    http://www.dba-oracle.com/t_email_mailing_messages_plsql.htm
    For complete details of job scheduling, see Dr. Hall's book "Oracle Job Scheduling":
    http://www.rampant-books.com/book_2005_1_scheduling.htm
    Hope this helps. . . .
    Donald K. Burleson
    Oracle Press author

  • Tasks sync error: "alarm set for later than entry ...

    I upgraded the firmware on my E71 to the latest version. Since then syncing my tasks with Outlook 2007 has been a battle. The main problem is that once syncronised and older than 24 hours, I no longer can edit the tass on my mobile; only within Outlook. I get a "alarm set for later than entry starts" error on my E71. I have reformatted the phone, restored the data, deleted all calendar entries in the phone - resync with Outlook, but the problem persist. I also get duplicate entries at time or entries which do not sync in both directions. This messed up most of my tasks. PLEASE HELP.

    I do experience the same issue with my TODO in Nokia E72. NOKIA are you listening here?

  • FM in update task - How do you debug for a user exit (IW32)

    Hi,
    I am working on user exit IWO10009, fm EXIT_SAPLCOIH_009, transaction IW32.
    The user-exit should be called any time an order is saved with parts added to the component tab.
    The import structure of the user exit is CAUFVD, which doesnu2019t contain the items in the component. Instead, I have to go into table RESB and get the components.
    However, when I go into RESB from inside the user-exit, the added components have not yet been added to the table.
    As such, I was thinking of creating a Z function module in update task to process this code after the order is saved & RESB is updated.
    2 questions
    1 u2013 Is this the best way of accomplishing this?
    2 u2013 How do you debug FMu2019s in update task? I have set a breakpoint & have switched system debugging on from inside the debugger, but it doesnu2019t stop inside the fm.
    Please help.
    Thanks,
    John

    Hi,
    to debug update task you need to switch on "update debugging" not the "system debugging" from the menu Settings->update debugging.
    -Ramesh

  • How to automatically/programmatically "publish" reports for local users of Crystal Reports 2011?

    Hi,
      I'm not sure if I'm using the correct Crystal Reports terminology here, so apologies in advance.
      We've got Crystal Reports 2011 and are developing an application which comes with a number of report files (.rpt) as part of its installation. These reports are used to provide a view onto the database that our application writes to.
      Is it possible to automatically manage the collection of reports that are available to users of the Crystal Reports application? Ideally this would be done as part of our application's installation/upgrade procedure. In the case of upgrades, it is possible that some report files may be modified, some removed and others added. (i.e. as the application database's underlying schema is modified or new features added/deprecated).
      I believe this could be achieved manually by starting up Crystal Reports and adding and removing reports to/from the Workbench, but we'd like this list of reports to be available to all users on the PC (Crystal Reports is installed on the same PC as our application), and for the update procedure to be something that was automatically scriptable or programmable in something like .NET.
      I've read about the Repository (which sounds like a solution to making reports available for all users), but suspect that this is only usable after some other product(s) has been installed? I'm not entirely sure what products they would be.
      Could you please let us know whether this can be achieved with the version of Crystal Reports we've got, and if so, how?
      The version of Crystal we have is: SAP BusinessObjects, CR Developer, Version 14.0.4.738 RTM, Product Type: Full
      Many thanks in advance,
        -Nige

    CR 2011 does not install any SDK... You can however download SAP Crystal Reports, developer version for Microsoft Visual Studio, which is an SDK that will let you work with VS 2010 and 2012.
    You will then have to decide if you want to use the Crystal Reports SDK or the InProc RAS SDK.
    Samples are here:
    Crystal Reports for .NET SDK Samples - Business Intelligence (BusinessObjects) - SCN Wiki
    NET RAS SDK Samples - Business Intelligence (BusinessObjects) - SCN Wiki
    Dev Help files:
    SAP Crystal Reports .NET SDK Developer Guide
    SAP Crystal Reports .NET API Guide
    Report Application Server .NET SDK Developer Guide
    Report Application Server .NET API Guide
    Discussing your requirements with sales may not be a bad idea either: 866-681-3435
    http://www.sap.com/contactsap/directory/index.epx
    Or, create a phone support incident here:
    Crystal Single Case Technical Support - SAP Business Objects US Online Store | SAP Online Store
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Assign roles automatically when user gets created

    Hello,
    I want to know if there is a way to assign basic roles to all the users in the system when they get created in the back end as well in the portal.
    Thanks in advance.

    Hi Rahul,
    There is no such way to assign automatically basic role to all users. You can go for tool sugested by Alex.
    And also you can check one solution if this works for you  that we have used in Past and proposed by business. In that if the Basic role is like end user role and needed for all portal users.  Then you can create on Template users (Type dialog)  . Then you can create the new users by copying the template user.

  • RSS feeds update automatically, even though set for manual-only checks

    The only time I want new feeds nagging at me is when I have time for scanning blogs. i.e., I click:
    Mailbox > Get New Mail > RSS
    I've set the RSS preferences to check manually, but I'm finding that the RSS feeds update intermittently and become a distraction. Is there anything I can do?

    The only time I want new feeds nagging at me is when I have time for scanning blogs. i.e., I click:
    Mailbox > Get New Mail > RSS
    I've set the RSS preferences to check manually, but I'm finding that the RSS feeds update intermittently and become a distraction. Is there anything I can do?

  • Automatic file length setting for continuous recording?

    In iMovie 6 I was able to do long duration ( all night) recordings with automatic file splits at ten minutes. Hence, I would have 6 manageable files per hour.
    I can't find a way to set file lengths in iMovie 9.
    Is there some place in the preference files where I can set the length?
    Thank you in advance.
    Thomas

    Is there a length/size limit that GB can import?
    http://www.bulletsandbones.com/GB/GBFAQ.html#recordlength
    I made an 85-minute mp3 recording (with an Olympus LS-10) that does not successfully import
    http://www.bulletsandbones.com/GB/GBFAQ.html#PortableRecorderMp3s

  • Random changes when changing setting for individual slide in a slideshow

    I've used iPhoto for years and produced many slideshows. However, now when I try to use Ken Burns Effect for an individual slide, I click on the "start" area, adjust my slide, click on "end," and then iPhoto jumps to a totally different slide in the slideshow. When I go back to the slide I wanted to work with, nothing was saved, and the same random change of picture happens.
    Actually, the Ken Burns Effect hasn't worked correctly on ANY slide I've tried.
    Also, when I try to rearrange the slide order, the slides may stay in the correct order for a few seconds, but then a slide may jump four slides to the right (and again out of order). This behavior is strange and random. It is infuriating and I don't know what to do.
    Any help would be greatly appreciated.
    ALSO, when I export a slideshow with music, the song plays fine for a few minutes, but then another song starts and the two songs are playing on top of each other (actually, it may be the same song playing over itself too).
    What gives?!

    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild.
    Regards
    TD

  • How to automatically open browser window for getting user id & password

    i have created a jsp page, that page cannot be open by anyone anyway, it should be only visible to me only.
    how do i achieve this.
    my requirement is that whenever any one request for that jsp page, browser should automatically open one window and ask for user id & password, if it is right then the page should be displayed else error should be shown.

    Adding the following to web.xml will define security constraints for all resources under the /admin directory, also only a user in the manager role will have access to these resources.
    For tomcat you can look at the conf/tomcat-users.xml file for setting up users and roles
         <security-constraint>
              <web-resource-collection>
                   <web-resource-name>Secure Pages</web-resource-name>
                   <description></description>
                   <url-pattern>/admin/*</url-pattern>
                   <http-method>GET</http-method>
                   <http-method>POST</http-method>
              </web-resource-collection>
              <auth-constraint>
                   <description></description>
                   <role-name>manager</role-name>
              </auth-constraint>
         </security-constraint>
         <security-role>
              <description></description>
              <role-name>manager</role-name>
         </security-role>

Maybe you are looking for

  • How do I add more GB to my iMac?

    I'm hoping this is the right place to put this (I'm a bit inexperienced in the whole hardware-software department, so really don't know what pertains to what).  I've got an iMac which I got back in 2008, and am looking to update it to Mountain Lion. 

  • Mapping XML into 3rd party system using XIF adapter

    Hi Gurus, First of all let me thank all of you for a tremondous contribution you are making for these kind of topics(CRM XIF) in SDN. I could solve half my problems by looking into your replies. But I have a new & similar problem now. I am able to cr

  • My Mac does not respond during login

    I am using OS 10.5.2 My iMac does not respond during login. After the desktop and dock are shown, the ball (cursor) keep rotating. I can do nothing except moving the cursor. All application including finder do not respond. Is there any solution? Than

  • OM/PA Bug - Personnel have different Org Unit in PA.

    An employee was hired into an Org Unit A. However, when I check into PA20, the employee's org unit is showing as Org Unit B. I checked PPOME, and the Employee (Person) and his position and it is shown under Org Unit A.(the correct Org Unit.) I check

  • Clicker Wheel Problem!!

    I just got a brand new ipod this past Saturday, after selling my older version one. I got a 20gig photo pod and the click wheel is already not working. When I first got it, the first day or so I guess it seemed fine. However, now when I glide my fing