First check that the state service Application has started and State Service Application Proxy has been assigned to your web Application ;
Open your Central Administration
Go to Application Management
Under Service Applications click Configure service application associations
Click on the Application Service Proxy Group of the WebApplication you’re trying your workflow on
Find State Service Application and make it checked .
If you dont have State Service Application you can create a new one by below;
1. Click and lunch Start->All Programs -> Microsoft SharePoint 2010 Products-> SharePoint 2010 Management Shell .
2. In Windows PowerShell, type $stateapp= New-SPStateServiceApplication -Name “State Service Application”
3. Create a State Service database and associate it with a service application, by typing New-SPStateServiceDatabase -Name “StateServiceDatabase” -ServiceApplication $stateapp
4. Create a State Service Application Proxy and associate it with the service application by typing New-SPStateServiceApplicationProxy -Name “State Service Application Proxy” -ServiceApplication $stateapp -DefaultProxyGroup