The objective of this blog is to share how you can change the notification to the users who are newly assigned in the assignment matrix list during runtime and continue the workflow to move ahead. We came up a situation working with the current project very recently.
For example: Suppose you have three states say State1, State2 and State3 and you have assigned three users for these three states in the assignment matrix say User1 for State1, User2 for State2 and User3 for State3. Now when the workflow enters into each state it sends a notification to that State user. That notification we can display into the dashboard by filtering the task item for that logged in user from where that logged in user can operate on the associated List form (Remember not the task form) and submit the form.
Now, if the workflow enters inside the State2 it will throw the notification to that User2. But for any reason User2 left the company and the item that he/she needs to fill up left unattended. So, the workflow will not move further. In this situation Administrator want to change the State2 user to User2New and want the notification to send in User2New dashboard from where that new user can operate on the associated list form and the workflow will keep moving. How it’s possible?
First of all, you need to change the AssignedTo user name for the corresponding task list item in the associated task list with the new user and then you need to update the required field created for attaching NINTEX Task outcome contentype to that task list. This is completely a custom code you need to do to update the user in that associated task item inside that task list and here it is:
1. Getting all task item inside the task list:
2. Updating the required item’s AssignedTo column/field of the task list:
This is a very simple snippet by which you can take full control of a task list attached with NINTEX contenttype in a workflow and can do any type of runtime customisation as you wish. This is an interesting code and hope this will serve you to alert or notify newly assigned user during the workflow runtime in coming days and don't need to wait for the previous assigned user to fill the task form.