cancel
Showing results for 
Search instead for 
Did you mean: 

Error connecting to the workflow manager: Operation is not valid due to the current state of the object

Not applicable
7 0 3,573

Products: Nintex Workflow for Office 365

Summary

Unable to design Nintex Workflows in Office 365 on Team Sites.

Symptom


Issue when loading Nintex Workflow designer in Office 365:

"Cannot connect to retrieve your license information. Please try again, and if the problem persists, , contact Nintex Support.”.

and/or:

"Error connecting to the workflow manager: Operation is not valid due to the current state of the object”

Cause


This can occur if sites are standard Team Sites deployed from Web Templates. Team Sites from Web Templates are not created with the Workflow Service Store feature and therefore SharePoint workflows cannot run.

Resolution


You can use PowerShell to add the missing feature:

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client")
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime")

#authenticate
$secureString = ConvertTo-SecureString ###password### -AsPlainText -Force
$ctx = New-Object Microsoft.SharePoint.Client.ClientContext("https://###.sharepoint.com/sites/###/")
$ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials("admin@######.onmicrosoft.com", $secureString)
$ctx.Load($ctx.Web);
$ctx.ExecuteQuery();

# Add Workflow Service Store
$guid = [System.Guid]"2c63df2b-ceab-42c6-aeff-b3968162d4b1"
$ctx.Web.Features.Add($guid,$true,[Microsoft.SharePoint.Client.FeatureDefinitionScope]::None)
$ctx.ExecuteQuery();

# Add Workflow Task
$guid = [System.Guid]"57311b7a-9afd-4ff0-866e-9393ad6647b1"
$ctx.Web.Features.Add($guid,$true,[Microsoft.SharePoint.Client.FeatureDefinitionScope]::None)
$ctx.ExecuteQuery();

Thanks to WoodoWeb. For the full post please see http://woodoweb.com/?p=241