cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Rule in Alfresco ?

backbutton
Champ in-the-making
Champ in-the-making
How to create a Custom Rule in Alfresco ?  I want to set a rule to detect when  file is uploaded to a  specific folder.

Can you please tell me relevant configuration  for this ?


My Alfresco Installation :  alfresco-3.3g
9 REPLIES 9

bisana
Champ on-the-rise
Champ on-the-rise
Go to the site
Select Document Library
You could see the folder which are created, if not create one
on the RHS (Right Hand side ) of the folder, click more, you can see "Manage rule", click it and define you own rules for the folder
Thanks
Joseph john

backbutton
Champ in-the-making
Champ in-the-making
"Manage rule", click it and define you own rules for the folder

Do you mean I can define Custom Rule through GUI  ?   I find there are predefined rules.


My objective is:
——————–

(1) Create a Custom Rule to detect when file is uploaded to a specific folder.

(2) When the above event is triggered I want a message in Action class.


Can I  do this through GUI ?

bisana
Champ on-the-rise
Champ on-the-rise
When the above event is triggered I want a message in Action class.
I did not get what u mean by action class
But in my case, I have used the same rule(GUI) to send notification, apply aspect, apply Custom Types etc to the files when the files are uploaded to my rule defined folders
You need to take some time and check it for your needs
Thanks

backbutton
Champ in-the-making
Champ in-the-making
When the above event is triggered I want a message in Action class.
I did not get what u mean by action class

I'll write a java Action class with an execute method.  I want this  file  upload trigger event to be captured in this class.  

I want this because this execute method basically   will execute some code  whenever a file is uploaded to my rule defined folders .


But in my case, I have used the same rule(GUI) to send notification

Can you send notifications to an Action class's execute method   ?

mrogers
Star Contributor
Star Contributor
Not sure what you mean by "notifications".    But its straightforward configuration to define a rule to run an action as and when files are  uploaded.

If you want a finer grained control then you can write a behaviour and register it with the policyComponent.

backbutton
Champ in-the-making
Champ in-the-making
But its straightforward configuration to define a rule to run an action as and when files are  uploaded.

Yes.  exactly this is my requirement .  I want this precisely . 

Which XML file to edit to define a rule for this ?
Can you please post me a sample rule for this ? 

my Alfresco version is 3.3g

Thanks

mrogers
Star Contributor
Star Contributor
No XML is required.   Configure the rule through Share or Explorer.

backbutton
Champ in-the-making
Champ in-the-making
No XML is required.   Configure the rule through Share or Explorer.

Ok…fine.  How do I  run an action based on this rule ?

I want to run my own custom Action  based on the rule. How does this  rule find my own custom Action   ? Where do I mention it ?

swetha
Champ in-the-making
Champ in-the-making
Hi, i want to change the folder color with diffrent directories in alfresco share. how to write the rule for this plz help me..