Cleanup Trident DB

Jul 31, 2012 at 6:03 AM
Edited Jul 31, 2012 at 6:26 AM


I have encountered the situation where I can't upload / update an activity because it already exists in the db.

It's not present in the trident workflow composer under activities or used in a workflow.  I tried to delete in the trident management studio under assemblies, it can't be deleted because it states its Active even though it isn't.

I decided to look at the database directly through the MS SQL Server Management Studio, and found a number of records in dbo.Activitys table column isDeleted set to 1.  These are the activities that I deleted previously I assumed I could reinsert the activity with the same name.  Even changing the name of the dll doesn't make a difference.

Tried deleting these records using SQL no success.

delete from dbo.Activitys where IsDeleted=1

The DELETE statement conflicted with the REFERENCE constraint "FK_ActivityInstance_Activity_33". The conflict occurred in database "Trident", table "dbo.ActivityInstances", column 'ActivityID'.

The statement has been terminated.

Is there a workaround or solution for this?

Thank you!



Jul 31, 2012 at 2:46 PM


To delete an assembly you first need to delete all the activities and workflows that are using the same assembly. It is deleted in the order of Workflow(s) first then second all the activity(s) and then in the third step the assembly.

The activities which are active only needs to be deleted. The list of all the activities which are active can be seen when the given assembly is selected in the registry manager in the Trident management studio.

Please let me know if this helps.

Trtident Support Team