In this exercise you will build a simple workflow in Visual Studio 2010 to understand the workflow development and Deployments procedure.
1. Open Visual Studio 2010 and create a new workflow project:
a. Select the Sequential Workflow template in the Visual C# » SharePoint » 2010 then click ok.
b.Verify the URL. The workflow should be deployed to http://localhost/sites. Indicate that the workflow must be deployed as a farm solution.
c. In the wizard set the workflow name to WorkFlowLab1 - Workflow1 and select the List Workflow radio button. Click the Next button.
d. Clear the check box indicating a workflow association should be created on deployment. An association will be created manually to test the association page.
e. Click the Finish button.
2. Add a new logToHistoryListActivity from the SharePoint Workflow section of the toolbox.
3. Add it immediately following the onWorkflowActivated1 activity.
4. Set the name of the logToHistoryListActivity to logToHistoryListActivity1 using the Properties window.
5. Set the History Description of the logToHistoryListActivity1 to (This workflow Initiated Successfully )using the Properties window.
6. Set the HistoryOutcome of the logToHistoryListActivity1 to (Successfully Done )using the Properties window.
At this time you are going to prepare and deploy the workflow
7. Setup the auto association parameters that will tell Visual Studio to automatically associate your workflow with the TestList when it is deployed.
a. Select Workflow1 in the solution explorer.
b. In the Properties window, set the Auto Associate property to True.
c. In the History List property click the [...] button to start the wizard.
d. Click Next >, On the 2nd page select a list of TestList in the first dropdown and click Next >.
e. On the final page check the first check box and clear the rest and click Finish.
8. Deploy the workflow to SharePoint and verify that it works.
a. Right click the project in solution explorer and click Deploy.
b. When the deployment is complete, open Internet Explorer and navigate to http://Servername/Lists/TestList/AllItems.aspx.
c. Add new Item in the List.
d. Click the drop down menu on one of the Item in the list and select Workflows.
e. Click the WorkFlowLab1-Workflow-1 link to start the workflow.
f. When the workflow is complete verify the workflow history by clicking on Completed status link.
g. Workflow information
Thanks for ur post.It is really healpful
ReplyDelete