cancel
Showing results for 
Search instead for 
Did you mean: 

Customized Business Rules in Alfresco Share 4.2.c

johnpelquingua
Champ in-the-making
Champ in-the-making
Hi Everyone,

I have a situation here:

"A user uploaded a document with no document type and that document must automatically go to the Unclassified Folder."

Is it possible to hard code this functionality in Java? Or is there a way to just configure the Share Application.


Best Regards,

5 REPLIES 5

rjohnson
Star Contributor
Star Contributor
Every document has a type when it is created. Unless you do something special it will get created as cm:content. What you can do is set up a global rule in each of your sites that says "when a document is created with type cm:content move it to an unclassified folder". That you can do without any programming at all, just create a rule on the document library and include subfolders.

Bob Johnson

Hi Bob,

Thank you for your response..

So does this mean I have to set a rule upon Upload on each sites wherein that type of document is unclassified and it will
go automatically on the "Unclassified Folder"?


Best Regards,

zladuric
Champ on-the-rise
Champ on-the-rise
Of course, depending on your use case, you might want to make that rule automatically added to any newly created site. This is also possible, but that time you will have to do some code, I believe that the rules can be added programatically.

Hi zladuric,

Thank you for your response,

So it is possible to code it because I dont want to add the 5000+ sites with the same rule I just want it to
be generic that the rule is already applied to each of the sites.


Best Regards,

rjohnson
Star Contributor
Star Contributor
Basically, Yes, you need to set up your rule on each site.

Alternatively if you set your rule up on the Sites folder and set "include sub folders" it would work on all sites. To achieve things this way you would either need a global "unclassified folder" that everyone went to and then reclassified their documents and moved them to the site they wanted manually OR you could write a little Javascript that your rule could execute which with a bit of thought would allow you to have just the one rule working accross all sites.

Bob Johnson