By Default Rule apply on directory creation in document library

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2016 09:30 AM
I want to assign same rule for all the directories/folders like adding same custom Aspect in document library. Right now I am manually assigning the same rule for all newly created directories/folders. Here my question is it possible to set rule(adding the custom aspect) automatically on directories/folders creation.
Thanks in advance
Thanks in advance
Labels:
- Labels:
-
Archive
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2016 11:12 AM
Do you mean that you want to automatically add a rule to each new folder that is created?
If you want to have the same rule added to each folder, then you could add the rule to a higher level folder and have the
lower level folders inherit it.
If you want to have the same rule added to each folder, then you could add the rule to a higher level folder and have the
lower level folders inherit it.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2016 09:42 AM
Yeah, but only in one particular site. Here all the folder will be higher level folder. What you have explained is I have already gone through while creating the rule for folder. Any how thanks for your reply
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2016 11:19 PM
You can use
Please let me know, if you're not clear.
Change Type
option in the folder details page. When the folder is changed into your custom type, you can hook up folder behavior folder rule in the Java side.Please let me know, if you're not clear.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2016 09:04 AM
Hi Jakeer,
If all the folders are in the same site or in a small number of sites, the easiest way is as art99trash mentioned and create a rule to set the aspect. A lot of people don't realise, but using the Repository view, you can actually configure rules on the Document Library object itself (in the normal view you're already taken inside this node and can't get at it). Doing this means that any folder created underneath the Document Library in a site will have the rule run. You would need to do this on each site you want this done on, and there would still be a manual step for new sites.
The other option, which is probably overkill, would be to create a custom behaviour that will fire on node creation for folders. This would mean that you would always apply the aspect when a folder gets created, no matter where or when - this could well include folders created by Alfresco in some instances as well, so be aware (as I said, probably overkill but fully automated
)
Regards
Steven
If all the folders are in the same site or in a small number of sites, the easiest way is as art99trash mentioned and create a rule to set the aspect. A lot of people don't realise, but using the Repository view, you can actually configure rules on the Document Library object itself (in the normal view you're already taken inside this node and can't get at it). Doing this means that any folder created underneath the Document Library in a site will have the rule run. You would need to do this on each site you want this done on, and there would still be a manual step for new sites.
The other option, which is probably overkill, would be to create a custom behaviour that will fire on node creation for folders. This would mean that you would always apply the aspect when a folder gets created, no matter where or when - this could well include folders created by Alfresco in some instances as well, so be aware (as I said, probably overkill but fully automated

Regards
Steven

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2016 09:46 AM
Thank for your reply. In second way you explained, is it possible to apply only for a particular site?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2016 05:24 PM
Hi Jakeer,
Yes it's possible but it would be bad practice really, as effectively you'd be hard coding the site name into your behaviour (Java code). You'd basically have a bif dirty if statement saying "only do the following if site name = "X".
You'd be much better off using a rule based mechanism if you're talking about a single site, or a known set of sites, as you can choose to apply the rule only where you need to.
Generally behaviours are better suited for system-wide actions and rules work better when you want to limit things to differently.
Regards
Steven
Yes it's possible but it would be bad practice really, as effectively you'd be hard coding the site name into your behaviour (Java code). You'd basically have a bif dirty if statement saying "only do the following if site name = "X".
You'd be much better off using a rule based mechanism if you're talking about a single site, or a known set of sites, as you can choose to apply the rule only where you need to.
Generally behaviours are better suited for system-wide actions and rules work better when you want to limit things to differently.
Regards
Steven
