cancel
Showing results for 
Search instead for 
Did you mean: 

Rule that modifies content in sub-Spaces

manders
Champ in-the-making
Champ in-the-making
Total rule-newbie here!

I need to create a rule that does the following:

1. Trigger whenever a new Space is created in this Space (via CIFS, but that's neither here nor there)
2. In the new Space, transcode a .wmv file to .flv (on the command line, so I'd need to trigger a shell script here and pass it the .wmv file somehow - alternately, define a custom transformer that does its work on the command line)
3. Copy the resulting .flv to another server (again with the command line, either via SCP or CIFS, unless Alfresco has some way of transferring files directly via the scripting engine (even copy/export to the local filesystem))
4. Change some URLs listed in a config file inside the new Space to reflect the new location of the video

Is this all doable via the JavaScript scripting engine? If someone could point me to some resources to get started I'd appreciate it. Thanks!
2 REPLIES 2

manders
Champ in-the-making
Champ in-the-making
On #2, I realize now this would be fairly simple by defining a RuntimeExecutableContentTransformer as per:
http://wiki.alfresco.com/wiki/Content_Transformations

#4 could be handled via another command line "transformer" (using bash or perl) I suppose, though having a script triggered by the new sub-Space creation would certainly be cleaner if possible.

I suppose the core problem right for me right now is simply - can I make a rule on a Space trigger when a new sub-Space is created, and pass the name of that sub-Space as a parameter to the various transformers and scripts?

manders
Champ in-the-making
Champ in-the-making
For anyone monitoring this thread, the problem I'm currently having with .wmv to .flv conversion using ffmpeg is here: http://forums.alfresco.com/en/viewtopic.php?f=4&t=19634.