cancel
Showing results for 
Search instead for 
Did you mean: 

how to make a Javascript to run in background

lvs
Champ in-the-making
Champ in-the-making
Hi everyone,

I am using a script that may be applied to a folder and recursively to all its sub-folders. As this could take a long time I would like to know if tehre is a way to run the javascript in background and then let the user to go on working.

Is this possible?
Thanks in advance for your help
Laura
2 REPLIES 2

gavinc
Champ in-the-making
Champ in-the-making
Yes, technically there is but the UI doesn't expose it via the Run Action wizard.

You could customise the RunActionWizard to do this, have a look at the line:

this.getActionService().executeAction(action, nodeRef);

in the finishImpl method. executeAction can take more parameters, one of them being a flag to indicate whether the action should execute synchronously or asynchronously.

lvs
Champ in-the-making
Champ in-the-making
Thanks a lot for your help Gavin!