Part 1 of this article is located here:
Create a State-Machine Workflow with SharePoint Designer Part 1
If you have already read part 1 of this article (and you should because part 2 won't make sense without it!) then you should be ready to construct a State-Machine workflow with SharePoint Designer 2010.
So now let's get to it!!
Open SharePoint Designer 2010 (SPD10), open your solutions site, and then click on the Workflows icon in the left pane navigation menu. When the workflow tab appears in your design surface from the Quick Access Bar choose Reuseable Workflow. We will create two reuseable Workflows, here is the data you need to fill out the workflow creation form:
Create 5 Steps for this workflow, here are the step names:
Here is the design for Step 2. In this step we establish our normal State-Machine Workflow pattern, which is as follows:
Some of the finer points:
Here is the design for Step 3. This step, and all the additional steps, will follow the same pattern as step 2.
Here is the design for Step 4. This step will follow the same pattern as step 2.
Here is the design for Step 5. This step will follow the same pattern as step 2.
Once you have all these steps configured then save, publish, and deploy your workflow to the Task Process List.
Now for our Review Task Workflow. This is also a very simple workflow, it's purpose is just to modify the three metadata values of the document in the Review Process Library. By modifying these values the Review Task Workflow does two things - changes the State and starts the Review Process Library workflow (which will then create a new task based on the changed state).
Once you have all this step configured then save, publish, and deploy your workflow to the Review Task Library.
So by now you may be asking, "How does all this work?" Let's go through a scenario to help explain:
I hope that helps!
Tom
Create a State-Machine Workflow with SharePoint Designer Part 1
If you have already read part 1 of this article (and you should because part 2 won't make sense without it!) then you should be ready to construct a State-Machine workflow with SharePoint Designer 2010.
So now let's get to it!!
Open SharePoint Designer 2010 (SPD10), open your solutions site, and then click on the Workflows icon in the left pane navigation menu. When the workflow tab appears in your design surface from the Quick Access Bar choose Reuseable Workflow. We will create two reuseable Workflows, here is the data you need to fill out the workflow creation form:
- Workflow 1
- Name: Review Process Workflow
- Description: State-Machine
- Content Type: Review Process Library
- Statr Options: Manual and On Item Change
- Workflow 2:
- Name: Review Task Workflow
- Description: State-Machine
- Content Type: Review Process Tasks
- Start Options: Manual and On Item Change
- Submitter
- Compliance Officer
- Business Manager
- Quality Control
Create 5 Steps for this workflow, here are the step names:
- Initialize
- Submitter
- Compliance Officer
- Business Manager
- Quality Control
Here is the design for Step 2. In this step we establish our normal State-Machine Workflow pattern, which is as follows:
- Check Three Conditions:
- Task Status
- Review Process Role
- Review Process States
- Create a new task item in the Review Process Task list with these values:
- Content Type ID
- Title
- Review Process Role
- Review Process States
- Description
- Workflow ID
- Assign To
- Create a Log entry to record the action
- Write a Log if no conditions are met for that step
Some of the finer points:
- Make sure the role is for the person Receiving the task
- Use the Current Item ID as the Workflow ID
- Use the Workflow Initiation Form parameters to assign the task to a participant
Here is the design for Step 3. This step, and all the additional steps, will follow the same pattern as step 2.
Here is the design for Step 4. This step will follow the same pattern as step 2.
Here is the design for Step 5. This step will follow the same pattern as step 2.
Once you have all these steps configured then save, publish, and deploy your workflow to the Task Process List.
Now for our Review Task Workflow. This is also a very simple workflow, it's purpose is just to modify the three metadata values of the document in the Review Process Library. By modifying these values the Review Task Workflow does two things - changes the State and starts the Review Process Library workflow (which will then create a new task based on the changed state).
Once you have all this step configured then save, publish, and deploy your workflow to the Review Task Library.
So by now you may be asking, "How does all this work?" Let's go through a scenario to help explain:
- Joe User uploads a document to the Review Process Library
- Joe wants his document to be reviewed so he manually begins the Review Process Workflow
- The Initian Form of the Review Process Workflow prompts Joe User for the account information of the four Role Based Participants involved in the workflow
- Joe provides the acocount information and then clicks the Start button, this starts the Review Process Workflow
- On the First Run the Review Process Workflow initializes values and then creates an initial Submitter Task in the Review Task List
- The Submitter receives notification that he/she has a new review task
- The Submitter reviews the task and chooses to change the state by modifiying the Review Process State value and then clicks OK
- The Review Task Workflow modifies the state based metadata values of the document in the Task Process Library
- Based on the new metadata values the Review Process Workflow creates a new task in the Review Task List
- Another participant receives notification that he/she has a new review task
- This participant reviews the task and chooses to change the state by modifiying the Review Process State value and then clicks OK
- Steps 8 through 11 continue to repeat until the Review Process Workflow is completed
I hope that helps!
Tom
7 comments:
Dear Tom,
thanks for posting this usefull thread. I was trying to redo this example with sharepoint designer. I have a question after you have configured, saved and published the Review Process Workflow. You describe to follow this step:
"Once you have all these steps configured then save, publish, and deploy your workflow to the Task Process List."
How do you deploy the workflow to the Task Process List? Many thanks for your help!!
regards
Jorge Luis
Hello Jorge,
This artcle gives a nice step through of the deploy or "publish" process options -
http://sharepointyankee.com/2010/12/11/options-for-deploying-reusable-workflows-in-sharepoint-2010/
I hope that helps!
Tom
You indicated that the Review Task Workflow should be published to the Review Process Library. Shouldn't they be the other way around?
Hello,
Yes, you are correct, I have updated the blog - thanks for noticing that.
Tom
On Step 1, both Update Item(s) are to update the First Run field to Yes?
Thanks,
Mario
msaaval@me.com
Hello Tom,
The Task Workflow is not updating the Values on the Review Process Library. Any idea why? I followed the same steps you indicated on your 2 articles.
Why is it necessary to Update the First Run field twice during the Initialization Step?
Any help will be greatly appreciated.
Regards,
Mario
msaaval@me.com
Hey Mario,
Sorry for the late reply, it's been a busy few weeks for me.
On Step 1, both Update Item(s) are to update the First Run field to Yes?
I've looked through the instructions but I'm not sure where you see the instruction to update the First Run item twice, can you post the exact comment you are referring to?
The Task Workflow is not updating the Values on the Review Process Library. Any idea why?
Do you recieve any errors? Can you post one of your tasks (images and text) so I can review it?
Thanks!
Tom
Post a Comment