12-07-2017 11:26 AM
Hi,
I'm trying to do an automatic deployment of alfresco i've already achieve to do it with my amp files using script but i don't see how to do it with my rule ?
- I've a JS file to put un the script folder
- and i need to add a rule on a folder using this script on share
Is there an API or something else to do that on share ?
Thanks
12-08-2017 12:16 AM
Question is no fully clear.Please rephrase it.
12-08-2017 02:24 AM
Ok sorry
so i need to do a ready to use install of alfresco architecture (with custom models, folders to add, and rule on a folder)
- just launch script
- i don't want to set anything using share
my script already deploy custom models, create folders etc ... but i don't see how to "push" my js script file in "Data Dictionary/scripts/" folder and use it on another folder this is my question hope it's clear now
i find a way using SDK but i need to switch my rule from js to java that was not planned i hope there is another option ...
thanks
12-08-2017 02:30 AM
You can bootstrap the content , in your case the file which you would like to put in data dictionary, Refer below link for more details on that.
Bootstrap content | Alfresco Documentation
I am not sure regarding rule, whether they can be applied using bootstrap or not.You can check on that.If it doesn't support than, I guess you can use patch in alfresco.
12-08-2017 09:40 AM
Yes it's exactly what i want to do thanks and it seems that it works for rules just need to acp export my folder with rule on it, I try to do what i want and i explain that step by step
12-09-2017 03:42 PM
i have finally achieve to do what i want, an amp file to : create a new model / put a js file in the data dictionnary/scripts folder / create a folder with this rule set on it with alfresco 5.2
and that's it, compile it, you will have your amp file put it in amps folder in alfresco restart and enjoy ... or not if alfresco crash : in that case go in tomcat/logs/catalina.out (if you're using tomcat of course) and see the stacktrace, in my case i had as first error "Context initialization failed" then "org.alfresco.error.AlfrescoRuntimeException: Bootstrap failed" then a new error with the real problem like impossible to find this file etc ... with that you can correct the issue
bootstrap-context.xml :
//Here is my bean model
//Here is my bean for the rule and the folder
Explore our Alfresco products with the links below. Use labels to filter content by product module.