Hello. It is posible to create with JavaScript a folder with rules? I need to create folders containing rules with JavaScript and I don't know how. Thanks.
It's not possible in the out-of-the-box code of Alfresco because the RuleService is not exposed by the Rhino engine. Anyway you could expose all the services and methods that you need writing your own scopable object for the Javascript API: http://wiki.alfresco.com/wiki/4.0_JavaScript_API#Adding_Custom_Script_APIs Hope this helps.
Another way to go around this, but it may not be possible in your case, is to create a dummy folder somwhere in the repisotory and set rules for it using share, and then instead of creating a new folder in your script, copy the dummy folder.