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

Question

Question

Internal Workings of "Only Delete Empty Folders" Checkbox

asked on June 18, 2021

Hi, I'm looking for someone from possibly the development side to hopefully chime in on this, as I'm looking for a very technical answer.  We have a scenario where we wrote a couple of workflows (Albeit poorly written) that route documents and clean up empty folders afterwards..  It was not functioning properly and was routing thousands of documents a night, and was triggering a second workflow that cleaned up empty folders.

The problem we found is that the workflow seems to be deleting empty folders (Which is correct), but occasionally is deleting a folder with a document inside!  I've confirmed both workflows have the checkbox "Only delete Empty Folders" checked, but there is no other explanation I can find.  

 

So my question is this, what are the internal checks within the Workflow Delete Entry activity, and what checks does the "Only Delete Empty Folders" do exactly? 

The document appears to have moved into a folder the same second the other workflow was deleting it.  But this would mean that the delete entry activity "Checks if folder is empty" and then deletes it afterwards, and there could theoretically be a "however many millisecond gap" where the activity said "Yep, folders empty" and immediately after, another workflow put a document inside it, then the initial workflow continued to delete the folder thinking it was still empty.

 

I know the root of my problem is fixing these workflows to not function like this, but I do need confirmation that this would be theoretically possible to happen, as the audit logs can only show me so much (they do not provide the WF GUID or anything to prove the specific WF, all I have is date/time stamps).  

 

Thank you in advance for your help, and look forward to any insight Laserfiche can provide me.

 

0 0

Replies

replied on June 18, 2021

Yes, that is theoretically possible. Assuming you are not also purging deleted entries immediately, you should be able to confirm that by looking in the recycle bin for the user specified in the connection profile. Both the folder and the document would be in the recycle bin and have the same deletion date.

0 0
replied on June 18, 2021

The folder is in the recycle bin, with the correct date/time stamp, deleted by the WF profile account.  So does my scenario sound correct, that the WF had a small window where it thought the folder was empty, and in that window prior to actually deleting it, another workflow put the document inside?

0 0
replied on June 21, 2021

If the document is also in the recycle bin too with the exact same deletion date, yes, that might be what happened.

 

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

Sign in to reply to this post.