# Prevent delete or rename of a document or folder

**URL:** <https://community.bloomreach.com/t/prevent-delete-or-rename-of-a-document-or-folder/2789>\
**Category:** Experience Manager (PaaS/OnPrem)\
**Created:** [September 18, 2021, 5:11am UTC](https://community.bloomreach.com/t/prevent-delete-or-rename-of-a-document-or-folder/2789 "2021-09-18T05:11:28Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![woonsanko](https://avatars.discourse-cdn.com/v4/letter/w/b5a626/32.png) [@woonsanko](https://community.bloomreach.com/u/woonsanko)\
**Post date:** [September 20, 2021, 9:00am UTC](https://community.bloomreach.com/t/prevent-delete-or-rename-of-a-document-or-folder/2789/3 "2021-09-20T09:00:44Z")

</div>

> [@marnix](#):
>
> Hi!
> 
> I managed to find a way to do it – by changing the workflow implementation class to a custom one that wraps the default implementation with some logic that checks whether an action is allowed or not, and sending a WorkflowException (with a cleaned up .toString()) back to the user.
> 
> Is that the recommended way to do it?

It seems hard to say this one is better than others nowadays regarding workflow customizations, but perhaps you can find it easier to customize and maintain custom SCXML action classes instead of the whole workflow implementation class. The following topic discusses something similar:

- [Pre processing of document events](https://community.bloomreach.com/t/pre-processing-of-document-events/2079)

Regards,

Woonsan

---

_[View the full topic](https://community.bloomreach.com/t/prevent-delete-or-rename-of-a-document-or-folder/2789)._
