07-11-2018 06:33 AM
Hello,
I want to create/assign hundreds of rules and i don't want to create/assign for every folder manually. How can i do this programatically? Are there any config file where i can define them?
PS: I'm using Alfresco Community - 5.2.0.
07-11-2018 06:36 AM
This answer is still valid (afaik): https://community.alfresco.com/message/636634-re-how-to-create-rule-for-aspect-programmatically?comm...
07-11-2018 06:41 AM
And where should i place that code?
07-11-2018 06:42 AM
This code is from the Java Foundation API, you can deploy it by using an Alfresco SDK project.
If you feel more comfortable, the same can be achieved also by using REST API.
07-11-2018 06:50 AM
Sorry for my lack of knowledge but:
1) Do you have any tutorial about how to use/create an Alfresco SDK project?
2) I heard that REST API is deprecated, and i can't find a method for rules in here https://api-explorer.alfresco.com/api-explorer/
Repository REST API Remote
This is the older deprecated REST API based on web scripts. You should use the new REST API, which consist of the CMIS REST API and the Alfresco REST API.DEPRECATED: use REST API instead.
07-11-2018 07:03 AM
Best tutorial on how to start with Alfresco SDK is https://ecmarchitect.com/alfresco-developer-series-tutorials/maven-sdk/tutorial/tutorial.html from Jeff Potts
Currently, the new REST API (based in Swagger/OpenAPIs and available at api-explorer website) does not include rules support yet. You should use the old REST API to manage rules. Although this old REST API is deprecated, it will be available for a year or two.
Explore our Alfresco products with the links below. Use labels to filter content by product module.