Behavior:
I get following error message:
Primary key for relation type: User with GUID: 12345-*********-********-********* cannot be found!
Solution:
Please check following in the database:
SELECT * FROM [dwsystem].[dbo].[DWUser] where guid '<GUID from Error Message>'
This should return nothing.
SELECT * FROM [dwworkflowengine].[dbo].[Permissions] where ExternalEntityId = '<GUID from Error Message>'
Here something should be returned.
What you need to do is to delete the found entries in the permission table.
delete
FROM [dbo].[Permissions]
where [ExternalEntityId] = '<GUID from Error Message>'
Please be careful while deleting from the database.
ONLY DELETE THIS WHEN YOU CAN'T FIND IT IN THE DWUSER TABLE.