Answered by:
Conditionally apply a workflow

>
Question
-
We've got 2 different user groups for our SharePoint content providers: Providers and Approvers.
When a page is created or changed, we apply an approval workflow that sends an email to the Approvers group asking them to review and approve the page. Members of the Approve group are also subject to this workflow, which doesn't make much sense (i.e. why send a request to myself to approve content).
Is there a way to state that an approval workflow is applied only when the current user is a member of the Providers group?
stevenTuesday, March 3, 2009 3:00 PM
Answers
-
You can still start the WF, but inside you check if the current user is a member of the Provider Group. If not, terminate the WF.
- Proposed as answer by Frank Chiang Tuesday, March 3, 2009 4:01 PM
- Marked as answer by steven_455 Thursday, March 5, 2009 1:16 PM
Tuesday, March 3, 2009 4:01 PM -
Hello Steve! Good to see you on the forums :)
This is one of those things that should be a heck of a lot easier than it is. You could always create a SharePoint Designer workflow and use the Is User a Member of a SharePoint group before sending the email etc, and in fact if the user is, then just set the approval status to approved etc.
This is pretty easy to do once you download and install Useful SharePoint Designer Custom Activities from codeplex located here: http://www.codeplex.com/SPDActivities
I know it's a codeplex project, but it is safe and I have it running on every production box of SharePoint in my environment and almost all of my previous environments because the activities are so useful. (There are quite a few extra ones :))
If you don't like the above idea, you could also code an event reciever to handle the exception rules, or as suggested earlier by a fellow community member you could create your own custom workflow. Personally I would say the custom workflow is the most amount of effort for this though.
Hope this helps,
Richard Harbridge- Marked as answer by steven_455 Thursday, March 5, 2009 1:20 PM
Thursday, March 5, 2009 3:49 AM
All replies
-
Hi Steven
If you are using OOB approval workflow then I think that may not be possible. You can create your custom workflow to achieve that.
AmitTuesday, March 3, 2009 3:11 PM -
You can still start the WF, but inside you check if the current user is a member of the Provider Group. If not, terminate the WF.
- Proposed as answer by Frank Chiang Tuesday, March 3, 2009 4:01 PM
- Marked as answer by steven_455 Thursday, March 5, 2009 1:16 PM
Tuesday, March 3, 2009 4:01 PM -
Hello Steve! Good to see you on the forums :)
This is one of those things that should be a heck of a lot easier than it is. You could always create a SharePoint Designer workflow and use the Is User a Member of a SharePoint group before sending the email etc, and in fact if the user is, then just set the approval status to approved etc.
This is pretty easy to do once you download and install Useful SharePoint Designer Custom Activities from codeplex located here: http://www.codeplex.com/SPDActivities
I know it's a codeplex project, but it is safe and I have it running on every production box of SharePoint in my environment and almost all of my previous environments because the activities are so useful. (There are quite a few extra ones :))
If you don't like the above idea, you could also code an event reciever to handle the exception rules, or as suggested earlier by a fellow community member you could create your own custom workflow. Personally I would say the custom workflow is the most amount of effort for this though.
Hope this helps,
Richard Harbridge- Marked as answer by steven_455 Thursday, March 5, 2009 1:20 PM
Thursday, March 5, 2009 3:49 AM -
Thanks Richard. The CodePlex option sounds promising. I'll give that one a shot.
stevenThursday, March 5, 2009 1:17 PM