cancel
Showing results for 
Search instead for 
Did you mean: 

How to manage a rule to move approved files to another folder?

miraclesuki
Champ in-the-making
Champ in-the-making
Hi all,

I am trying to use the rule management of alfresco to do something like move the approved files from a folder into another folder.

May I know that the default alfresco rules are enough to fulfill this criteria?
If yes, may I know how can I configure with it?
If no, Could anyone help to give some advise on how to do something like that?

I'm looking forward and appreciated to hearing your advice and recommendations.
Thanks a lot.

Mandy
4 REPLIES 4

mitpatoliya
Star Collaborator
Star Collaborator
If you have your custom workflow then you can have one property which will be set as approved when document is being approved.
Then only rule will be sufficient which will check for that property value and move document to another folder when that property value is set to approved.

Other way is to do it through workflow only where you can put small javascript snippet in workflow transition event which will move document to desired folder.

aaditvmajmudar
Confirmed Champ
Confirmed Champ
There are 3 ways to do this.

1) By applying rule on parent folder and checking approved property as suggested by <a heref="https://forums.alfresco.com/users/mitpatoliya>mitpatoliya</a> and move to another folder by writing logic in rule's js file.

2) By writing javascript snippet in workflow transition event

3) And if you are not comfortable with javascript then workflow action class to move to another folder.

Hope this helps.

beber7
Champ in-the-making
Champ in-the-making
Can we go a little further in the solution.
Let's say, I want to set a Rule to do so ( Solution 1 of AaditVMajmudar ).

What variable should I use ?

I was thinking about a rule like this :

When:
Items are updated

If all criteria are met:
Status equals 'Completed'

Perform Action:
Move items to …
The thing is, Status do not seems to be updated. Note, I'm using an AdHoc workflow ( the one given by alfresco, running on jpbm ).

I didn't figured out how to modify it as advised in solution 2 with a JS snippet and couldn't deployed a custom worflow ( solution 3 ), seems activiti seems is giving me trouble… Never succeed to deployed it without having a problem on running time.

So to have the document move when the User click "Task Done" what should we do ? Smiley Happy

Thanks,
Bert

lauvanya
Champ in-the-making
Champ in-the-making
I have created similar approach and find security issue. Is there a way where rules can be applied overriding Alfresco security setup?