You are viewing limited content. For full access, please sign in.

Question

Question

Total 95,891 unterminated workflow instances. How do I clear these?

asked on August 31, 2015

Workflow newbie here. Attached is my first workflow 'MigrateToDifferentVolume'. When I started this workflow (after promoting to a business process), it seemed like that it had worked. It changed all documents' volume to what I wanted. But after a few weeks, our sysadmin notified me the backup file of SQL database for Workflow is abnormally big (>2GB). There was no workflow defined or ran except the one mentioned above. When I ran workflow statistics report, there were 95,891 workflow instances 'completed' but not 'terminated'.

 

These are my questions:

- Is there any easier way to change all files under a folder recursively to all subfolders to a specific volume except the way I tried, using workflow?

- What's the difference between 'completed' and 'terminated' state of a workflow?

- Why it's not 'terminating' when it was 'completed'?

- How do I clean up this mess? When I tried to 'End Workflow', the menu 'Terminate' was greyed out (see attachment for screen shot)

Thanks a lot.

 

 

Workflow Completed Instances 95891.JPG
Workflow SQL Db Size.JPG
Workflow Statistics.JPG
Workflow Terminate Disabled.JPG
MigrateToDifferentVolume.JPG
0 0

Replies

replied on August 31, 2015

Sorry, the workflow designer file uploaded was wrong. 'Delete Entry' was mistakenly inserted during capture process. I Attach the right file here.

replied on August 31, 2015 Show version history

Completed, Running, and Terminated are all mutually exclusive. Completed Workflows finished successfully, Running Workflows are ones that are currently doing things, and Terminated Workflows are ones that hit errors that caused them to end early. 

If your database is getting large consider looking at the Advanced Server Options in the Workflow Administration Console and setting a smaller length of time to keep the instances. 

Also for ways to do this without recursion, you could use a Search Repository activity instead of a Find Entries and a loop, as it can search on volumes and on folders to look in, including subfolders.  The search Syntax would probably be similar to ({LF:VolId="1"}) & {LF:LOOKIN="Root\SearchHere"}

ReportingLength.png
0 0
replied on August 31, 2015 Show version history

Thanks a lot, Kevin. So, I guess after certain period, the database size will be reduced automatically and not much to worry about it. 

Cheers

0 0
replied on August 31, 2015

The database size is not reduced automatically. Rows will be deleted by Workflow as they age out based on the settings mentioned, but SQL Server does not automatically shrink databases when they have free space. Laserfiche does not have any control over it, though you can add that option to your SQL maintenance plan.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.