cancel
Showing results for 
Search instead for 
Did you mean: 

Running a script at a web project

dnewport
Champ in-the-making
Champ in-the-making
we have a simple js script to generate a unique number to add to a file name when we save it.

The script runs fine at the web project root, but it wont run at any of the subspaces (yes we do have the run in subspaces checkbox checked).

Any ideas?/

thanks

dn
3 REPLIES 3

kvc
Champ in-the-making
Champ in-the-making
Dean:


Could you help clarify here?

Currently content rules are supported in spaces only - not in web project.  If you're running your js as a custom action configured via a content rule, it will only work in a space and not in the context of any web project.  Within the Alfresco GUI, when you look at the single space Web Projects, that space is in reality a launch point into the AVM repository, which hosts sandboxes for site development and management, where each sandbox contains a collection of versioned files and directories.  Since the Web Project root node is a normal Alfresco space, any content rule will work.  All nodes underneath that are "special" nodes that at this point (coming in the short to medium-term) do not yet support content rules.

If you want to automate some action today within a web project, that is today done through workflow only.  For lots of basic things, workflow is a bit heavy-handed. Like I said, we look to add support for content rules within the next few months (you can track this issue on our JIRA at:  http://issues.alfresco.com/browse/WCM-49).

Kevin

dleeuwen
Champ in-the-making
Champ in-the-making
Could you post your script here please or send me an pm? I am also looking for a way to generate unique document/folder names.

Thanks,
Danny

dnewport
Champ in-the-making
Champ in-the-making
Kevin…will see if we can work around it…