Mass Delegate Pending Tasks. Based on Workflow.

  • 27 January 2020
  • 4 replies
  • 21 views

Badge +3

Hi

 

I am trying to find a solution for a Nintex Workflow Tasks issue.

Is there a way to delegate all the tasks pending on a user based on a workflow to different users.


4 replies

Userlevel 2
Badge +9

Hi @AshMa 


I think the primary tool you'd want to use is the Nintex Workflow Webservice DelegateTask operation:


DelegateTask

https://help.nintex.com/en-US/sdks/sdk2013/#Reference/SOAP/NW_REF_SOAP_DelegateTask.htm%3FTocPath%3DNintex%2520Software%2520Development%2520Kit%7CNintex%2520Workflow%25202013%2520Software%2520Development%2520Kit%7CNintex%2520Workflow%25202013%2520SDK%2520Reference%7CWeb%2520Service%2520Reference%7CService%2520operations%7C_____7

 

By default, the web service only offers parameters such as TaskID (required) and Task List name. However, if there is a way that you know of that you can discriminate between tasks such as their Titles, I would suggest building a workflow that would check the title and, if the condition is True, assign that taskID to a specific user.

 

The logical design would be similar to:

 

  • For each Task in Workflow Tasks:
    • If Title contains "Leave Request" then
      • TaskID = Current Task ID
      • User = Jerry Hernandez
      • Call Web Service DelegateTask
    • Else, move on to next condition, (perhaps continue checking for other titles)

 

The series of conditions that would be evalauted would be something like:

Leave Requests -> Jerry Hernandez

Project Approvals -> Mary Clark

Acquisition Opportunities -> Tom Berry

 

The end result should be each kind of task going to their desired owner.

 

Badge +3

@nicksha
Thanks for the Quick reply.
Here I have 15 workflows in the site and having 15 different Tasks list.
Do I have to create a list and supply the values like choose the Task list and theAssigned To user . Then start a Site workflow using these values to loop the list and assign the tasks to the desired User.

Userlevel 2
Badge +9

@AshMa If each work has its own task list, you may have made your work even easier. You query Task List A and create a collection of tasks where the Assignee = Harry and then, for each task, assign them to John, and do this on each Task List.

 

In SharePoint 2016, I put together a quick proof of concept. Here is an example:

6279i421DC3CACDF39A30.png

 

I am sure you can find improvements to my logic here to make the workflow more efficient, but I think the general idea here should apply all the same. I hope this helps!

 

Badge +3
@nicksha
Thanks for the POC. I think you just confirmed my scenario.
I appreciate it.

Reply