How to assign tasks in Approval Workflow to a set of users selected from a Lookup table RRS feed

  • Question

  • Hi all,

    I am new to Project Server and I am using Project Server 2013 On premises deployement. Please help me on how to achieve the below scenario:

    I have a requirement where, the initial PDP will have 2 fields (Reviewers and Approvers), wherein the engineer himself will select who the reviewer and approver from the Lookup tables.

    Now I have to start task process with these selected people for approval.

    Say for example , engineer has selected Alice and Bob as 2 reviewers, then

    In the workflow I have :

                 Start Task process with Project Data: Reviewers (which is giving error as

    [System.ArgumentException: AssignedTo at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.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) ]

    Then I tried logging the value of Project Data: Reviewers, It logged the value as Alice, Bob (which looks pretty good),

    Then I tried assigning only 1 person as Reviewer, then also I get the same error.

    So can anybody please tell me where I went wrong. Is it not possible to fetch the data from the values selected as Project Data from the Lookup tables ? If not then what is the workaround I can use to achieve this ?



    Tuesday, January 27, 2015 12:16 PM

All replies

  • hi,

    Are you calling data directly from Look up table or attached a custom field to Look up table and pulling data from that custom field instead of Look up table?

    Tuesday, January 27, 2015 12:19 PM
  • Hi Nabeell,

    I am using the enterprise custom field Reviewers, which has Custom attribute of type Lookup table, reffering to a Lookup table. And I am calling the Enterprise Custom field in the workflow.



    Tuesday, January 27, 2015 1:57 PM
  • What is the 'type' of field in the lookup table? Assuming it is text, not sure how the workflow would know to assign 'Alice' a task unless the value of 'Alice' resolves to an actual user. Have you tried setting the field value to a username or email address associated with an account to see if the workflow works that way?
    Tuesday, January 27, 2015 2:26 PM
  • Hi,

    I am assuming you are using SharePoint designer to create your workflows? You can assign your approval task to users based on a lookup value (I have that scenario implemented but the field doesn't have the multiple selections enabled). You need to make sure the values in the lookup table are valid AD users (e.g. try to assign manually Alice and/or Bob to a task and see if that works). Also, I would suggest testing your workflow by assigning the tasks directly to either Bob or Alice (without using the Project custom field) and see if that works and then try the custom field(s)

    Hope this helps


    Tuesday, January 27, 2015 11:35 PM
  • Hi Paul,

    Yes I am using SP designer for Workflows. And yes, You were right, there was a mismatch in the names of AD account and the Lookup table, now with 1 person selected from the lookup table it is assigning the task properly. However with multiple selection, it is failing.

    As Robert mentioned, the fetched value is a text as "Alice, Bob", which makes 2 usernames as a single text. So when I try to assign a task to this group, which returns value as "Alice, Bob", workflow fails to find such AD user, as it is an invalid value.

    So is there any way I can seperate this out to form 2 different username ? I checked for string extraction function in th Workflow, but nothing helped me for this scenario.

    Any input will be helpful.



    Wednesday, January 28, 2015 10:08 AM
  • Hi Shanky,

    Are you using the Assign a task or Start a task process when creating the approval tasks?


    Wednesday, January 28, 2015 2:06 PM
  • Hi Paul,

    I am using Start a task process, as i have multiple participants.

    Somehow i found a workaround. Kept a SP list of all users [Alice, Bob, Kevin etc.,] . Then i checked each user of this list in the Reviewers custom field[eg. Bob, Alice], using Utility Action "Find Substring in a string". Then once it is found I assign task to that user, till I reach the end of the Reviewers custom field. This is looking simple, but needs lot of local variables, loops and actions, which is a bit long process.

    I found no other simple way.



    Thursday, January 29, 2015 5:33 AM
  • Hey Guys,

    That doesn't help as a solution. As I am starting task with each person, the task waits until that person approves or rejects. But if I change that option in task outcome, then it doesnt help my situation. So now i have to make a group of users who are selected at the beginning of the project and then start task process with them. But i am not finding any such OOTB solution. ie., to group certain individual users into a group dynamically, in order to start task with them :'(

    Any inputs will be helpful ,



    Thursday, January 29, 2015 9:06 AM