SharePoint 2013: Step by Step Approach to Create a Visual Studio SharePoint Workflow (Sequential)

First, we need to install and configure Workflow Manger. You can install it using Web Platform Installer

http://lh4.ggpht.com/-D_AipvAtIXo/UdqxXHXBUnI/AAAAAAAABvs/wXDsa5hwJOw/image_thumb%25255B3%25255D.png?imgmax=800

You can find a complete guide here (Prabath’s Blog).

http://lh4.ggpht.com/-9Xjc5NfH0hg/Ud6YAsV7EGI/AAAAAAAABwg/Gb4oEpgUoAw/image_thumb5.png?imgmax=800

http://lh4.ggpht.com/-7pqaRivVwbQ/Ud6YC5bKlCI/AAAAAAAABww/lqU8Usm8HiU/image_thumb11.png?imgmax=800

http://lh6.ggpht.com/-xmfAn87qKro/Ud6YGA-r16I/AAAAAAAABxI/hD_fLwgKjNY/image_thumb17.png?imgmax=800 

http://lh5.ggpht.com/-cBVpI_LwMRc/Ud6YInWs6vI/AAAAAAAABxY/AoHI8Ai9AfE/image_thumb28.png?imgmax=800

Select the options that you need to run the workflow:

  • Manual
  • Item Created
  • Item Changed

As a sample, let's get the “Age” column in the item and write it to log and update a column using a message.

http://lh4.ggpht.com/-G-KyRMpwI3Y/Ud6YKsqrWuI/AAAAAAAABxo/RiiI3Ps2fN8/image_thumb%25255B6%25255D.png?imgmax=800

Since we need to look at the Age Column, add the LookUpSPListItem to the sequence. In the** LookUpSPListItem** you need to set properties to currentitem and currentlist as well as you need to retrieve properties (you can change these on right side property window).

By clicking Get Properties, VS generates a GetDynamicValueProperties action. In there you need to select the variable as the source and specify properties you need to retrieve.

 http://lh5.ggpht.com/-tacTy5j7j1E/Ud6YM-z7FQI/AAAAAAAABx4/44OSRLBYTe4/image_thumb%25255B10%25255D.png?imgmax=800

Drag and drop a WriteToHistory Action to the sequence. Here you can go to properties and specify the message you need to log to history.

Then you can insert UpdateListItem with the property and variable you want.

And ultimately you can deploy the workflow to your server.

http://lh3.ggpht.com/-yo3QFYlOWE8/Ud6YOptasuI/AAAAAAAAByI/hWrFufyLwLg/image_thumb%25255B11%25255D.png?imgmax=800

This post only touches the overall process (steps) to deploy a workflow.