Thursday, April 4, 2013

Sharepoint 2010 State Service


Overview

The State Service is a shared service that is used by some Microsoft SharePoint Server 2010 components to store temporary data across related HTTP requests in a SQL Server database. In SharePoint Server 2010, the State Service is required by InfoPath Forms Services (including out of the box and custom workflow forms), the SharePoint Server 2010 Chart Web Part, and certain Microsoft Visio 2010 scenarios that do not use Microsoft Silverlight 3.

How to do

1. Create new workflow in sharepoint designer then publish to sharepoint

2. Go to your site collection | click to list which list is applied workflow | click workflow on ribbon

3.     Click to the workflow name
4.     You will get error
5.     Make sure State Service Application is started, if don’t have, you can create new by Open “SharePoint 2010 Management Shell” and input this script
$serviceApp = New-SPStateServiceApplication -Name "State Service"
New-SPStateServiceDatabase -Name "StateServiceDatabase" -ServiceApplication $serviceApp
New-SPStateServiceApplicationProxy -Name "State Service" -ServiceApplication $serviceApp -DefaultProxyGroup
6.     Service application is created successfully
7.     Click to the workflow name again
8.     Result as:


1 comment:

  1. Hi, If error. Please correct it as follow:
    $serviceApp = New-SPStateServiceApplication -Name “State Service Application”
    New-SPStateServiceDatabase -Name “SharePoint_Service_State” -ServiceApplication $serviceApp
    New-SPStateServiceApplicationProxy -Name “State Service Application Proxy” -ServiceApplication $serviceApp -DefaultProxyGroup

    ReplyDelete