Configure User holidays or vacations for automatic Human Task assignment in Default and Custom BPM Workspace

This post is demonstrated using 11.1.1.7

Configuring User Holidays/Vacations in BPM is fairly straight forward. The users can set up Holidays and select other Users to reassign tasks to. So if a task is assigned to a specific User and that user is on holiday, then the task is automatically re-assigned to the User the user has chosen.

They can make use of this functionality via the Default BPM Workspace or from a custom BPM Workspace implementation.

Default BPM Workspace (localhost:port/bpm/workspace)
We will perform the User Holiday tests with our good friend jcooper.

1. Log into the BPM Workspace

2. Click on Preferences at the top right:

3. Click on Rules on the left:

4. Click on Vacation Period (disabled)
    - Tick Enable Vacation Period
    - Select the Start and End Date
    - Tick Reassign to and look up the User you would like to reassign tasks to
    - Click Save

Once saved, the Vacation Period rule will change to Vacation Period (enabled) to indicate that a Vacation/Holiday period is active:

5. The above step is the simple quick way to create a holiday period. The functionality offers a further advanced approach to setting up rule based reassignments based on certain conditions e.g. the task name. Multiple rules can be enabled so that assignment of different tasks can be handled in different ways.

To view this functionality, click on My Rules then click on the green plus. The below screenshot shows an example of what a user could enter:

6. To test the functionality, I have used a simple BPM process where the first step is a Human Task component and is assigned to jcooper when initialised.

Once a test case is created, when we drill into the initialised human task instance in the Flow Trace of the EM, we can see that it was firstly assigned to jcooper, then the reassignment vacation rule removed it from jcooper and created the same instance for achrist - our chosen reassignment candidate:

7. We can log into the BPM Workspace with achrist and find an instance of the BPM Process awaiting her attention:



Custom BPM Workspace
If you have a custom BPM application implemented via adflibTaskListTaskFlow.jar, then you can make use of the task flow provided by this jar. The task flow is called rules-task-flow-definition.

Expose this task flow on a page and the user will see the same Rules page from the Default BPM Workspace. Be sure to grant this task flow priviledges in jazn-data.xml before deploying.


Note: I do not think it is possible for an admin to control Vacation rules on behalf of Users using the UI. So if a User comes back from Vacation/Holiday, it is their responsibility to ensure that their Vacation Rules are correct. An admin may be able to modify Vacation Rules on behalf of the user using the BPM API... but that is a separate investigation and would require a separate post! :)

7 comments:

  1. Good Post Onkar !!!

    ReplyDelete
  2. Hi Onkar,

    Lets say that we have ADF page associated with the human task and the logic is based on the logged in username - #{securityContext.userName}

    Now all the logic fails when the assignee is changed right? The logic on the page expects original assignee where as the task is acted upon by a new user.

    Your thoughts?

    Thanks,
    Sai

    ReplyDelete
    Replies
    1. Hi Sai,

      did you manage to find a solution for this? I am also investigating on the same issue.

      Delete
  3. Awesome,
    Thank you so much for sharing such an awesome blog...
    dindi house boat
    dindi resorts packages

    ReplyDelete
  4. Useful Information, your blog is sharing unique information....
    Thanks for sharing!!!
    dindi house boat
    dindi resorts packages
    dindi tourism
    dindi - ap tourism

    ReplyDelete