locked
sharepoint designer workflow how to assign to multiple users in serial using assign form to a group or one of task actions RRS feed

  • Question

  • I have a list of users that comes from a multi-select people  field so I have a string that has the users with a semi colen inbetween.

    I need to do what the OOTB wf does which you  have your list of users and you say you want it to be parallel or serial

    Parallel works fine - it assigns a task to each one at the same time, but I can't figure out how to do it serially.

    The other option is to figure out how to break up the string into individual users.

    Any help would be great

    I know I could easily do it in 2010 but can't figure it out in 2007.


    VTJeanne

    Thursday, July 5, 2012 2:22 PM

Answers

  • I don't think it is easy or efficient to do this with SPD2007.  That being said...

    Not knowing how many approvers you will have with any given instance of the workflow is the biggest hurdle.  Otherwise you could just have the first task of the workflow select the appovers (one people picker for each approver)  then have the last step create all of the Collect Data From User actions (one for each approver in succession).

    D-Virdi suggested using a secondary list to both parse and count the number of users selected from the first step.  I've never tried to do this but I don't think there are any custom actions within SPD2007 to do this.  This article begs the question of how to do this with a calculated column and counting of semicolons ->  http://www.endusersharepoint.com/STP/viewtopic.php?f=10&t=196
    If you choose this route (selecting an unknown number of approvers from a single people picker) you may need to download a custom SPD action from codeplex so that you can parse.

    Furthermore, even if you are able to parse your user field into seperate and distinct users you will always have a finite number of data collection tasks that you setup in the subsequent step(s).  For example if a user selects 15 approvers from the people picker and you have only built the next step to create a maximum 5 successive Collect Data From User tasks then that won't work.  (This would only work if you knew that users would never select over 15 users {for example} possibly because of user selection limitation... possibly because of who in their right mind would select 15 approvers :)

    I think the best way to go is to have a seperate people picker for each approver slot.  This way a user could never exceed the number of approvers that you've designed for (although, if not all of the approver fields are required then you will still need to count the number of approvers selected in order to know which (if) path to use in the next step.... i.e. if 1 approver selected then create one data collection task... if 2 approvers selected then create 2 data collection tasks... and so on and so forth.

    Please let us know how you make out.
    __

    Vermont Jeff


    ja

    Friday, July 6, 2012 4:33 PM

All replies

  • Hi,

    Creating serial workflow is tedious in SPD, so recommendation is creating using Visual Studio.

    If that option is not available there is a trick of doing it, there may be other possible solution that I'm not aware of.

    Steps:

    1) Create a new custom list with fields - 1) usernames, 2) Numberofusers (calculated column to count the number of users or ; in usernames) 3) FirstUser (Calculated column to get first username by splitting the ; from usernames)

    2) Create columns in you document lib where workflow will run - 1) IsParallelOrSerial, 2) UserRemaining , 2) IsWorkflowInitiated

    3) Edit your existing workflow and make it start when item changed and also add following extra steps:

         a) Very first step of WF should be condition If IsWorkflowInitiated equal to No and UserRemaining =0 then stop workflow. Figure out when to mark this field as Yes. I used user to Select radio button Parallel or Serial on Intiation form. When the radio has value update this field as Yes.

         b) Based IsParallelOrSerial flag change the logic which I assume you are doing right now. If Serial create new item in custom list and add usernames.

        c) Assign task to FirstUse.

        c) Then update UserRemaing as Numberofusers -1 in doc lib.

    I created custom SPD activity to update doc lib without creating version when need. except at step 3. c).

    I know this bit confusing, hope you get better solution but just sharing what I did.

    Thanks,

    Thursday, July 5, 2012 4:00 PM
  • Hi thanks for the quick response.

    I guess I do not understand it though.

    I think I looked at the calculated field to try to break up the userlist but did not see the people field in the list of available fields.

    I may just end up limiting the number of reviewers and having a field for each on then I could do it with out any issues.

    thanks


    VTJeanne

    Thursday, July 5, 2012 8:57 PM
  • Hi VTJeanne ,

    I understand that you want to start an approval workflow with multiple  users in serial .As far as I know ,when you create an approval workflow in browser ,you should type in or search the exact user name in the ‘Default Workflow Start Values ’ section .This will be users with semi-colon delimited .In this way ,when you choose’ One participant at a time ’ ,the tasks will be assigned in serial :When the first approval have completed his task ,another task will be assigned .

    If I have any misunderstanding ,please feel free to point it out .

    Thanks,

    Entan Ming

    TechNet Subscriber Support in forum

    If you have any feedback on our support, please contacttnmff@microsoft.com.


    Entan Ming

    TechNet Community Support

    Friday, July 6, 2012 2:37 AM
    Moderator
  • Hi entan,

    thanks for the reply. I know you can do it with the OOTB workflows, but I want to do the same thing in a custom SPD 2007 workflow. Any suggestions?

    I think I am going to have to create seperate fields for each approver and limit the number of reviewers and then I can do it serailly.

    I am open for suggestions. The biggest issue was that they do not know how many people at each step they need for the review as it changes. So it might be 2 or it might be 5 reviewers so it is easy for them to put the reiewers in apeople picker field with multi select on, but and it works for the parallel, but no way to say do task in serial likke in the OOTB one..

    thanks


    VTJeanne

    Friday, July 6, 2012 2:17 PM
  • I don't think it is easy or efficient to do this with SPD2007.  That being said...

    Not knowing how many approvers you will have with any given instance of the workflow is the biggest hurdle.  Otherwise you could just have the first task of the workflow select the appovers (one people picker for each approver)  then have the last step create all of the Collect Data From User actions (one for each approver in succession).

    D-Virdi suggested using a secondary list to both parse and count the number of users selected from the first step.  I've never tried to do this but I don't think there are any custom actions within SPD2007 to do this.  This article begs the question of how to do this with a calculated column and counting of semicolons ->  http://www.endusersharepoint.com/STP/viewtopic.php?f=10&t=196
    If you choose this route (selecting an unknown number of approvers from a single people picker) you may need to download a custom SPD action from codeplex so that you can parse.

    Furthermore, even if you are able to parse your user field into seperate and distinct users you will always have a finite number of data collection tasks that you setup in the subsequent step(s).  For example if a user selects 15 approvers from the people picker and you have only built the next step to create a maximum 5 successive Collect Data From User tasks then that won't work.  (This would only work if you knew that users would never select over 15 users {for example} possibly because of user selection limitation... possibly because of who in their right mind would select 15 approvers :)

    I think the best way to go is to have a seperate people picker for each approver slot.  This way a user could never exceed the number of approvers that you've designed for (although, if not all of the approver fields are required then you will still need to count the number of approvers selected in order to know which (if) path to use in the next step.... i.e. if 1 approver selected then create one data collection task... if 2 approvers selected then create 2 data collection tasks... and so on and so forth.

    Please let us know how you make out.
    __

    Vermont Jeff


    ja

    Friday, July 6, 2012 4:33 PM
  • Thanks for all the great feedback. We decided to go with a set number of approveres, tedious, but it will work.

    I agree that SPD was probably not the way to go but that was the way the project was designed so had to stick with it.

    thanks


    VTJeanne

    Thursday, July 12, 2012 12:13 PM
  • Does anyone know when you use the "Assign a form to a group"  the tasks are assigned in parallel to mutiple users. How do I determine what the approvers actually said - approved or denied. Currently I can only detrmine that they completed the task.

    How do I determine the fields that they filled out. I created a 2nd workflow to watch the task list and determine what they enter in each task, but that workflow does not run. I seem to have found that workflows do not run on SPD custom wf tasks. Any way to figure this out would be helpful.

    I just need to know what they picked in the custom fields

    thanks


    VTJeanne

    Friday, August 10, 2012 2:34 PM