I have developed and action that requires 2 parameters. One is a constrained list, the other should point to a NodeRef that represents a folder.
No problem with the first parameter after I discovered how Parameter Constraints worked: implement a new class extending , define the corresponding bean and set the constraint in the actions parameter definition.
For the second one don't know exactly how to act.By default the rules UI in share shows a text field in order to introduce the node reference by hand (useless for a final user) so I have to customise the UI for my action so that the picker is shown instead.
What happens if I install different AMP modules and all of them want to customise different rules ? The customisation from one will override the customisation of the other..
I'm afraid you have spotted a mistake in the documentation. I have now updated the section you refer to, to have the correct file name and path (both have changed, sorry about that), to become:
"* Take a copy of rule-edit.get.head.ftl and place it in {TOMCAT_HOME}/shared/classes/alfresco/web-exension/site-webscripts/org/alfresco/components/rules/"
I would also recommend taking a look at the Move & Copy actions in rule-config-action.js to get the folder picker working.
You are right in the assumption that if you install 2 AMP files that they will overwrite each other, we are currently working a lot with making customization easier and making sure they don't conflict each other, unfortunately the rules section is an area that we haven't touched yet. On HEAD there is, since a couple of weeks, the first cut of the possibilities to use a new spring surf concepts called "modules and extensions". These will make it possible to "append" data at the end of an .get.head.ftl file.
In this case making it possible to add the <script> import without copying the original file and also making it possible for multiple "modules" to append to the same file. It will also be possible to do the same with .get.js files in other wods having multiple modules change the template "model" before the template is exectued. However it is NOT possible to have multiple modules "extending" the same .get.config.xml file 😞 which in other words means that you still won't be able to have multiple modules extending custom rules. Hopefully we'll get there soon though. Please file a jira ticket if you think its something you think you would benefit from.