We have a requirement to allow automatic reassignment of tasks for a user during

We have a requirement to allow automatic reassignment of tasks for a user during a delegation period to whomever he/she has specified as a delegate for that period (such as a delegation setup for a 10 day vacation). We were trying to come up with options to reassign the task to delegate in real-time during the specified delegation period. There are task reassignment smart services and also the IFM Manager that allows us to reassign tasks on-demand. However, the requirement is for real-time reassignment during the delegation period. We could setup an exception flow on each and every task, but that would be time consuming and potentially error-prone activity. Does anyone have any suggestions for design options to accomplish real-time reassignment of tasks without a lot of additional set up for every task, since this is an application/system wide requirement?

OriginalPostID-181809

OriginalPostID-181809

  Discussion posts and replies are publicly visible

  • This is one of the approach, we used earlier and it might be useful.
    Designed a process model, which executes based on timer(2/4 hrs).
    In that model we are getting the respected task id's based on user(Using Execute Process Report), and we are reassigned the tasks to particular user based on logic using task reassignment smart service.
  • Yes, we had thought of a similar approach. However, this approach would not achieve real-time reassignment of tasks. Instead the reassignment would happen based on timer (every 2 or 4 hrs). Is there any design approach that achieves real-time reassignment during specified delegation period?
  • 0
    Certified Lead Developer
    Hi gauravg568,

    The above requirement can be done by using the below steps:
    1) Create a task report for the user i.e. the tasks of the user which you are going to delegate.
    2) Create a process model say "parentProcess" where you are going to have a timer event in place of start event and configure the timer value so that it starts when delegation starts.
    3) Create another process model say "childProcess" which is going to be used as a sub process in "parentProcess". In "childProcess" process model we are going to execute the process report which we created in step 1) using "execute process report" smart service this will give you the task id's of the particular user.
    4) After getting the task id's use "Reassign task" smart service to reassign all the tasks to the desired user.
    5) In scheduling part of "childProcess" which is a sub process in "parentProcess" there is an option called "Repeat until" here you can configure the end time for the delegation.
  • In that process model, create a parallel flow for User Input Task and Rule Event.Rule event will trigger a process which is used to reassign the tasks.
    The Rule event will execute, if user is on vacation, and the respected sub-process will trigger, and reassign the respected task.
  • Hi akkramanir, thank you for the steps. But step 5 will likely result in hitting a limit on number of node instantiations for the sub process node as the delegation period can span over days, which will cause repetitions of the child process for the entire duration. This will likely also lead to a much higher load on the system, as at a time many of these "childProcesses" will be running over the delegation period for many delegations potentially.
    Hi Rahul, would the suggestion involve setting up a parallel rule event for every task in the application? If so, is there a way to generalize this setup so we don't have to do this setup for every task? BTW each task (the sail form, acs, and pv mappings) are expected to be different across the application.
  • Yes, if we want to reassign the every task in an application if the user in vacation.
    Am attaching two screen shots. Main process and Sub process. Look into them. which will give you an idea.
    And we need to store user delegation details in database.(fromDate, toDate, taskReassignTo)
    In every main process, every UIT or the Node before the UIT will have two out flows, one is actual flow and one will reassign sub-process.
    Every time, when sub-process is called, it takes process id as input, and it'll get active task details. Using these details we have to fetch user delegation details from database(fromDate, toDate, taskReassignTo).
    At this point, we have task id and user. We can reassign the task using smart service.
    For this kind of activity, every process model should contain this sub-process(re-assignment) and similar workflow.


  • 0
    Certified Lead Developer
    Going back to the original requirements... I'm a little unclear here, without knowing how your system handles assignment as-is. A good practice I've seen elsewhere is to carry around the current task assignee in its own PV, though in some other cases I've seen the process rely strictly on chaining.

    When you say real-time reassignment, do you really mean REassignment, or do you mean INITIAL assignment? I'd think the case where you need things RE assigned would be limited to whatever tasks a user happens to have currently when their vacation is first entered; after that, shouldn't everything be handled by task assignment on an initial basis?

    What I'm getting at here: it seems to me almost as if your use case could be handled entirely by 2 separate pieces: the first would fire right at the time that a vacation first starts, and reassigns all tasks owned by the user (at that moment). The second would be a simple subprocess you could drop in front of every task, which could quickly query the "on vacation" DB table for the owner user, and divert the assignment to the delegate if they're currently out.
  • Why not create an expression implementing any required business logic to define assignment and use it for initial assignment. This way you have "real-time" assigment of all new tasks. For tasks that are assigned before the delegation period starts you can go the timer way. A simple process which checks for current delegations saved in DB and does the reassignment. This can run each night to prepare for the next morning or hourly of course.
  • We were able to build a working prototype of a process model to manage task reassignment during delegation periods as suggested by Rahul. Creating a custom rule would have achieved task reassignment at start of delegation period but not task reassignment to original assignee at end of delegation period, so we didn't use this approach.
  • 0
    Certified Senior Developer
    We are doing something similar for another client. We simply added a rule in the task assignment to add active delegate (if exists) as an assignee (or assignee's if more than one). This does not re-assign existing assigned tasks, but any new task assigned within the scheduled delegation timeline. I think this is the same approach as stefanh791. I am now looking for a way to perform a mass re-assignment capability with an audit trail (so not OOTB re-assignment).