Thursday, February 28, 2013

Workflow Manager cumulative update (February) error

After installing workflow manager cumulative update in February 2013, the workflow manager stopped working. When I was trying to access workflow settings in the list/library I was getting unexpected exception. Then I found the following error in the log file:
The EXECUTE permission was denied on the object 'InsertTrackingAndStatus'

To fond out how to enable and view the workflow manager log file, please follow the technet guide at: http://technet.microsoft.com/en-us/library/jj193526.aspx. From the error message it seems the problem is related to database permission related. So connected to the database (using SQL management studio) and found out the workflow manager windows service user's (under whose credentila's the workflow service is running) security settings. The original permission I found was "WFServiceOperators" and then I added dbo permission to the user also.  Then I restarted the SQL service and it all started working. I know this is not the best solution but for time being the hack solved the problem in my Dev.

Update From Workflow Team

I've posted the bug in Workflow forum: http://social.msdn.microsoft.com/Forums/en-US/wflmgr/thread/054d2a58-8847-4a6a-b1ab-05a79f49fe65  . As described in the forum, you need to run the following script against the database:

IF  EXISTS (SELECT * FROM sys.database_principals WHERE name = N'WFServiceOperators' AND type = 'R')
BEGIN
-- Grant all permissions of stored procedures and tables
DECLARE @ObjectName sysname, @ObjectType char(20), @Cmd varchar(300)
DECLARE ObjectCursor CURSOR LOCAL FAST_FORWARD
FOR SELECT name, type FROM sys.objects UNION SELECT name, 'WFUDT' FROM sys.types WHERE is_user_defined = 1

OPEN ObjectCursor
FETCH ObjectCursor INTO @ObjectName, @ObjectType
WHILE (@@fetch_status <> -1)
BEGIN
SET @Cmd =
CASE @ObjectType
WHEN 'P' THEN N'GRANT EXECUTE ON [' + @ObjectName + N'] TO [WFServiceOperators]'
WHEN 'WFUDT' THEN N'GRANT CONTROL, REFERENCES ON TYPE::[' + @ObjectName + N'] TO [WFServiceOperators]'
ELSE ''
END

IF @Cmd <> ''
BEGIN
EXEC(@Cmd)
END
FETCH ObjectCursor INTO @ObjectName, @ObjectType
END
CLOSE ObjectCursor
DEALLOCATE ObjectCursor
END
GO



But still if the above script doesn't solve your problem, you can set the workflow user as dbo in the database

1 comment:

  1. Its ok if you run this script on each WORKFLOWDB.

    Best regards

    ReplyDelete

Note: Only a member of this blog may post a comment.