cancel
Showing results for 
Search instead for 
Did you mean: 

parallizing rules execution

thk
Champ on-the-rise
Champ on-the-rise
I have an automatic ftp upload into alfresco. All arriving ftp-files should be sorted into subfolders according to defined rules.
Problem: if I run the ftp upload without activated rules the performance for the ftp-transfer is not good but satisfying. If I however active the rules the transfer is very slow and the executing process (that starts the ftp-transfer) has to wait long until the process can continue.

How can I get a better performance.
Just an idea of my side: can I de-couple somehow the ftp-upload from the rules execution so that I have two different processes? So the process starting the ftp-transfer doesn't have to wait for rules execution.  The rules execution shouldn't be triggered by the arriving of the files but by a different event. Is there a trick to do it?
6 REPLIES 6

zladuric
Champ on-the-rise
Champ on-the-rise
Maybe you can use something like I have:

Have the rule react only to a certain filename or file type, and update your ftp script accordingly.
For example, have the rule that waits for inbound "start_working.txt" and when one is uploaded, the rule works with the files in your incoming space?
And of course, update the ftp upload so it uploads an empty file named start_working.txt when it's done uploading other documents.

thk
Champ on-the-rise
Champ on-the-rise
Hi,

but what when I for example want to move all content uploaded into a space to a subspace and trigger only for an item with the name "start-working.txt" the move action will also be executed only on this dummyfile and not on the real content. Does it mean I have to execute a script  as an action? And I also have to delete the flagfile again at the end of the rules execution.



Thanks for help
Thomas

thk
Champ on-the-rise
Champ on-the-rise
Hi,

Can anybody post me an example for an script which moves all existing content files (not the subfolders) in the space to a subspace and then deletes the flagfile?  Im no javascript programmer.

Appreciate any helpl!!!

thk
Champ on-the-rise
Champ on-the-rise
Hi,

I really don't understand it:

That works but only moves the trigger_file not the other files:

var dss = space.childByNamePath("DSS");
document.move(dss);

This doesn't work, nothing happens (neither trigger nor other files are moved) but why?:
function movedoc(document)
{
var dss = space.childByNamePath("DSS");
for each (file in space.children)
{
file.move(dss);
}
}
movedoc(document);

And here also nothing happens:

var dss = space.childByNamePath("DSS");
for each (file in space.children)
{
file.move(dss);
}


Thanks for any help

invictus9
Champ in-the-making
Champ in-the-making
Syntax should be:
space.children[file].move(dss];

thk
Champ on-the-rise
Champ on-the-rise
Hi,

i've tried also

   
var dss = space.childByNamePath("DSS");
    for each (file in space.children)
    {
    space.children[file].move(dss);
    }



but nothing happens again.

Thomas