AnsweredAssumed Answered

(Javascript) business rules for bulk uploads

Question asked by leifuss on Aug 28, 2007
Latest reply on Sep 4, 2007 by leifuss

I'm trying to implement a dropbox system using javscripts triggered by business rules. (It seems a lot quicker and easier to manage that way than to create a rule for each action). The main problem that I am facing at the moment is with bulk uploads (generally via CIFS).

when faced with a directory the business rule will only be run over the directory itself, not the contents - I can handle this with simple iterative loop over its children, and this works fine if I execute the script on content that is already in Alfresco. If I trigger it on the point of entry however, Alfresco is still only aware of the parent node, so a call to
returns 0 (i.e. it is an empty array). That means that I can only apply metadata etc. to the directory itself and not its contents.

I could presumablyuse a cron job as a workaround but it would be much more efficient (and intuitive for users) to run it at the point of import. Has anyone found a way to do this?

Many thanks,