SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have developed a SP State Machine WF and was able to successfully deploy and work through the WF. I was wondering if you can dynamically change a SP WF at runtime.

I don't want to necessarily hardcode the participants to the WF in VS as I have already done. By doing this I will have to create multiple WF based off scenarios, but ti may be the only route

For example, given the type of request that comes into SP, I want it to route to the appropriate approver. Can this be done by placing users into a AD SharePoint security group and it filters through the participants in the group and will add accordingly? Can this be done by passing as metadata of some sort or any other way?


  • Nick
share|improve this question
up vote 1 down vote accepted

I've done this utilizing lookup lists.

In my situation the set of approvers was based on the metadata of the item the workflow was being run against. For example the field could be called Team and it looks up to a Teams list which has a Team Name and a Team Leaders (Person or Group) field. Now when a user selects "Marketing" for their team we know that we need to go back to the lookup list and look at the Team Leaders field where Team Name is Marketing (And you can actually get the exact ID of the item by casting the field on the workflow list as an SPFieldLookupValue).

Once you have the row, you have the approvers which you can then create approval tasks for and voila! It's all dynamic!

This is just one way you can do it but the approaches would all be very similar. In situation X (usually data driven) select Y as the approvers.

share|improve this answer
I've found out how to create lookup lists within SP. How would I associate the metadata with the item been run against the WF? Is there an example of this scenario you gave. How would it recognize that it needs to choose Joe from Marketing instead on the other 2 managers within the same department. Trying to wrap my head around this.... – nholloway4 Mar 22 '12 at 14:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.