Assigning Tasks Dynamically Using Start a Task Process in NWF0365

Cloud Wanderer
4 5 4,301

Yo yo, greetings everyone!

What if you got a requirement to Start a Task Process for a Group of users in Parallel (all at once),from a matrix containing the structure of your users as well as what they should/can approve.

Sounds pretty simple right? But with Nintex Workflow for Office 365 you get the following Task Actions and each of them have specific functionality:

1. Start a Task Process which is aimed towards Assigning a task to a group of Users, and allows workflow designers to specify task assignment criteria(Assign tasks all at once or in serial) as well as completion criteria (Wait for all responses, Wait for first response, Wait for specific response or Wait for percentage of a response). You may read up more on this action here

2. Assign a Task which is aimed at assigning a task at an individual User. You may read up more on this action here

So to cater for the scenario above (involving a list we could be using as a matrix to help us determine who our approvers are and so forth) I've come up with the following approach:

#Step (Workflow Action)Description
1Query List

Query your list containing your list of approvers and store the result/outcome in a collection variable called collApprovers

Note: Remember that by using the Query List you're able to perform some filters and so forth

2Set Workflow Variable
Set a text workflow variable called (ApproverEmailAddresses) to the result returned in step 1. (i.e. the value of collApprovers)
3Regular Expression

Take the variable in step 2 (ApproverEmailAddresses) and perform a regular expression to remove the following characters:





By performing a replace string operation with an empty text. Store your output in ApproverEmailAddresses.

Note: The pattern you will use to find these characters is \[|]|"


4Regular Expression

Perform another Regular expression on ApproverEmailAddresses to replace the , (commas) with ;  (semi-colons) and store this again in ApproverEmailAddresses

5Start a task process
Insert a Start Task Process Nintex Workflow Action and insert ApproverEmailAddresses in the Participants field and configure the Assignment Behaviour to Parallel (All at once)

Note: The Start a task process will automatically resolve the participants and assign the task to them accordingly

And that's it!

Hope this helps someone out there, cheers

Automation Master
Automation Master

Thanks for the explanation. Any idea why the "Start a Task Process" doesn't have the ability to store an ID in a variable. I understand that being a problem if you are creating a separate tasks for all assignees, but surely they could be stored in a collection. I'm only creating a single task for a group of users, first response applies, but I can't retrieve the ID to make use of comments.

Cloud Wanderer

Hey Ryan Greenaway‌ thanks for taking time to read my post, as well as for the comment! Yup I agree with you;  as for the "Start a Task Process" unfortunately this action (as of yet ) doesn't have the ability to do so. I believe that this has been posted on Nintex Uservoice as part of the feedback to help us improve the product  

Automation Master
Automation Master

Thanks Palesa Sikwane‌. I couldn't find such a suggestion for O365 so I've created one.

Store task ID for Start a task process action – Customer Feedback for Nintex 

Nintex Newbie

Hi Palesa Sikwane

Thanks for your description, thats exactly what I'm looking for.

Unfortunately I always get an error by assigning the Task.

Diesen Workflow fortsetzen 
 RequestorId: 47a80aae-8871-f9fc-0000-000000000000. Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.ArgumentException: AssignedTo at System.Activities.Statements.Throw.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation) Exception from activity Throw If Sequence Microsoft.SharePoint.WorkflowServices.Activities.OperatingWebContextScope NintexActivities.WorkflowXaml_f6a19ad8_fae9_46e2_88bb_539a99b9e906 Aufgabe zuweisen Sequence Flowchart test.WorkflowXaml_4a869748_fbc8_4124_9fbf_36525a076c0d 

My System is running in German Language - but this circumstance shoudn't be cause.

The String in my variable (at the time of assigining the task) is like this:;

Do I have to insert the variable in a specific form?

Thanks and kind regards,


Cloud Wanderer

Good morning ‌, 

Thanks for commenting on this, as well as providing some insight into the issue you're experiencing. 

I returned my data as String (default), if that doesn't work try using Email Address.