The workflow service account should have appropriate permission in database “WFInstanceManagementDB” and “WFResourceManagementDB” for the workflow to publish and run successfully.
Side effects if the account does not have appropriate permission.
- Workflow may not publish properly
- Workflow history status screen may not open i.e., the workflow link for list item may show unexpected error
How to troubleshoot this issue?
- Login to web front end server and open event viewer -> Applications and Services log -> Microsoft-Workflow and click “Operational”
- Look for error message as shown below
Failed SQL command after 1 tries with error ‘229’. Exception: System.Data.SqlClient.SqlException (0x80131904): The EXECUTE permission was denied on the object ‘InsertTrackingAndStatus’, database ‘WFInstanceManagementDB’, schema ‘dbo’.
giving appropriate permission to the service account as mentioned in the start of the article fixed this issue.
side note : I gave db_owner permission for the service account. Not sure about the actual permission at the time of writing this article.