Standard Workflow functionality provides the users with the ability to reassign a notification to another user or role (unless you specifically tell the process not to). However, if you aren’t careful, then everyone in the Workflow directory service is included in that list, which can produce some problems.
Firstly, the end user may not know which of the users they should be using – if there are multiple John Smith’s in the organization for example. Or if there are two users called “Faisal Mohammad” and “Mohammad Faisal” which one is the right person to be receiving the notification?
Secondly, the business may want to restrict who the notification can be reassigned or transferred to. For example, if the notification is one requiring an approval, then there may need to be some logic included to ensure that only people in a specific department can be used as the new recipient.
Thankfully, there is a mechanism included in the product which allows you to restrict the reassignment list of values using an attribute on the message. Here’s how:
Firstly, you need to determine your list of new users and put them all in a Workflow Role. This could be a new ad-hoc role that you have defined specifically for this one instance of the process, or you may already have a suitable role defined as standard (e.g. if you only want to be able to delegate to users who have been assigned the “UK Super HRMS Manager” responsibility.
Once you know the name of the role which have all the users assigned to it, then you need to store that name in the Workflow process in an item attribute.
The final step is to define an attribute on the message that you want to restrict the list, called #WF_REASSIGN_LOV and synchronise that with the item attribute holding the value of the role.
Once the new definition of the process has been deployed to the database, the messages will now check the value of the attribute and the list of users who can now be set as the new owner will be restricted accordingly.