Start a new topic

truncating workflow tables in our dev environment

hi there, 

during our workflow development we've had many starts, stops, direction changes, and have a bunch of data in the wf tables that I'd like to clean out of our development environment.


when I attempt to truncate the following tables, I run into an issue with WF_STEP_INSTANCE:


SQL Error [4712] [S0001]: Cannot truncate table 'xdmd_ProductDomain.dbo.WF_STEP_INSTANCE' because it is being referenced by a FOREIGN KEY constraint.


ive successfully truncated the remainder.  is there another table im missing?  or anything else I need to do to clean this last table out?  


Tables ive worked with in our domain:

 

 


WF_ATTACHMENT;

WF_BRANCH_INSTANCE;

WF_ERROR;

WF_STEP_INSTANCE;

WF_USER_NOTIFICATION_SETTINGS;

WF_USER_TASK_CANDIDATE;

WF_WORKFLOW_INSTANCE;

WF_WORK_ITEM;


Thank you

1 Comment

Hello Michael,


The data contained in the workflow tables are linked to actual data in the other tables of your data location.


Thus only truncated those table could lead to data discrepancies.


The easiest way would be to directly reset your whole data location.

This way all dependencies will be addressed together.


But please be careful if you delete your data location, that all custom objects are prefixed by "usr_", otherwise they will get dropped as well.


Best regards,

Alexia

Login to post a comment