I have been working on an app that contains complex approval process(serial then parallel blocks with multiple branches for different routes for approvals per branch) with multiple level of approvers. Been making good progress, until I got stuck in ‘Start a task process’ action.
– Requirement was that a whole AD group wanted to be assigned the task and anyone in the group SHOULD be able to approve/reject it.
– Start a task process to SharePoint group was tailor made for the requirement. Anyone from the group can approve the task and the rest of the members get notified about theirs tasks cancellation.
Now, I wanted to collect data for two fields from the AD group of approvers, which I then want to save it back in the list.. Possible as well provided I have ID of the task assigned to the group. I have been able to get the description, comments of approvers via GUID=taskID(WF variable) in ‘Assign a task‘ action quite a lot of times but, option to save task ID from ‘Start a Task process’ was not available.
Since the app users REALLY wanted to have ANYONE be able to approve the task, I had to find a work around for the step. And here is what I did that seems to meet the app users expectation.
-In place of ‘Start a task process’ just do ‘Assign a task‘ and select the SharePoint Group with the users you want in it.
-Store Task ID in a workflow variable(taskID)
-Use Description field in the workflow task to save the value of the fields you want to save back to your list.(In my case it was UserID and Email that I needed from Approvers in the SharePoint Group. Those values are required in the parallel block branches for further processing.
Notify the users of your SharePoint Group just before the task creation process. I was not able to receive the automated notification from task assignment for SharePoint Group. Setting up ‘Send an Email‘ option to the SharePoint group and having them enter value for UserID and email in the format you want(I chose to use the ‘Description‘ field and once any team member completed their task, asked them to save the values in the format UserID=id of user). In the email notification included the reminder in subject for guiding the approvers. You can always choose another method of announcement! 🙂
Create a custom view and list all the tasks filtered by ‘Assigned to’ the SharePoint Group. Include link to the custom view in the email body as well for quick link to the tasks.
Description of the task should be of the format
userid=id of the user you created,email=email of the user you created.
(example: userid=jbond,firstname.lastname@example.org) yep! Why? Well, why not?!
To get strings from Regular Expression check this out. Lots of examples and tips. http://www.regexr.com/
1) Group assigned? – Yup
2) Anyone can approve? Yup.
3) They were notified? Yup and Yup.
4) Got data back to save in the list? Yup again!
Now I’m off to parallel block, armed with my ids and emails, well tomorrow morning. Right now, the most productive thing I can do is to catch some zzzzzz!