Delaying Deletion of Action Center Storage Bucket Data

Hello,

When creating an action in Action Center, action center data is created in Storage Bucket. I want to make myself a process where I can add the files name to a queue (with a delay) and delete this file a week later.

This way, we can keep Storage Bucket clear while leaving time to review completed Action Center items. How do I get the names of files associated with a specific Action Center item. Is it in any of the C# objects we have in the workflow?

These are the files in question.

Thanks

Hi, @edevries

Store each Action Center related Storage Bucket file name in your form/task data then after approval, add the file name and scheduled delete date to a queue finally, use UiPath’s Delete Storage File activity from a triggered process to remove files after one week

Yeah, I know. I was asking how we get the names of the files created in Storage Bucket related to a specific Action Center item when created.

@edevries

When you create an Action Center item, the file you upload to the Storage Bucket gives you a file name or path as output just store that in a custom field like "uploadedFileName” in your form. Later, when you need it, simply pull the file name from that field, so every action is directly linked to its file

Hello @edevries

Edit: :information_source: Much simpler solution from Jon Smith below. Please refer to the next message.

List of files that gets written to Orchestrator Storage bucket can be fetched as soon as the task\action is created using the output from the task\action creation activities like Create Document Classification Action, Create Document Validation Action, etc.., as shown in the image below

Expression
<Action object output variable>.data.ToString()

The <Action object output variable> has metadata related to action like Id, Task URL, Title, and many more. This can be used to create a queue item with the output of the <Action object output variable>.data.ToString() expression along with the action Id, etc.., which can be referenced in another process that’s scheduled to run at a defined interval to delete the items from Storage bucket.

Hope this helps!

Doctor UiPath

2 Likes

The task itself contains the names of all the files in the Storage bucket.

You can create an automation that finds all completed tasks that were completed > 7 days ago, loop through each, read the task metadata that lists all the files in the Storage bucket and delete them one by one.

This is the only way I know of to delete them after a delay once the task is complete, otherwise they are deleted when the automation resumes or never.

1 Like

Thank you, I will use the JSON there and queue all of those file names to be deleted.

I am implementing a solution that uses that JSON data. Storage Bucket should really have more features for setting policies such as retainment time

Its actually not a limitation from UiPath here.
Storage blobs don’t track things like file created date etc apparently, so its not exposed by UiPath cause it doesn’t exist in the underlying structure.

I was quite frustrated for quite a while when trying to figure out retention and wanting to see data around the dates, then learning they don’t really exist.

If not from Storage Bucket, then from Action Center. Action Center item data should not be setup to just lurk around forever or disappear the moment an action is completed.

1 Like

Yeah, thats a fair point. It would be nice if actions had a retention policy and were set so that if they have links to storage bucket files they automatically get cleaned up when the action does. No arguments there.

Hope the workaround I suggested helps. This is for sure a challenge.

1 Like

I moved it into production, and it is working good. Have a small “Storage Bucket Janitor” process that I am adding delayed queue items to for cleanup now.

2 Likes

Delayed queue items is a really smart idea to solve this. I might implement that myself. I was always thinking about it from a perspective of using the dates on the tasks.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.