Workflow will not start. The form cannot be rendered. This may be due to a misconfiguration of the Microsoft SharePoint Server State Service.

Problem:

A workflow that is created with SharePoint Designer cannot be started.
The following error appears:

Error: The form cannot be rendered. This may be due to a misconfiguration of the Microsoft SharePoint Server State Service. For more information, contact your server administrator.

Reason:

The startscreen for the workflow, which is actually an InfoPath form, cannot be displayed. This is because the State Service is not installed or is not active.

Resloution:

Start a SharePoint 2013 Management Shell session and enter these commands to setup a State Service.
$ss = New-SPStateServiceApplication -Name "State Service"
New-SPStateServiceDatabase -Name "WSS_StateService" -ServiceApplication $ss
New-SPStateServiceApplicationProxy -Name "State Service Proxy" -ServiceApplication $ss –DefaultProxyGroup