06-23-2021 06:21 AM
Hi All,
I am trying to create rule through Alfresco RuleService API and has created basic of rule but want to create action which execute javascript present in Datadictionary/Scripts.
Below is my rule method:-
private void createRule(NodeRef ruleFolder) { Rule rule = new Rule(); rule.setRuleType(RuleType.INBOUND); rule.applyToChildren(false); String title = "Rule for Creation"; rule.setTitle(title); rule.setAction(getCompositeAction()); this.serviceRegistry.getRuleService().saveRule(ruleFolder, rule);
Can someone help me with creating compositeAction which execute script when condition "document is created or enter this folder" which is present in Rule template when we create manually. Also how to execute error.js to it when error occures similar like when we use Rule template.
Please do help me out.
Thanks and Regards,
Piyush
06-24-2021 04:39 AM
06-28-2021 04:09 AM
Hi @cristinamr ,
Thanks, that was really helpful . Am looking into it to develop for Execute script options. If you could help anyway will be great.
Thanks for the help again.
Thanks,
Piyush
06-28-2021 05:02 AM
I'm glad that tutorial help you.
Concerning last question: what are you looking for exactly? What is your expectation?
I'll give you some tutorials where explains the different options you have available:
https://docs.alfresco.com/content-services/6.2/develop/reference/web-scripts-ref/#understanding-web-...
https://ecmarchitect.com/alfresco-developer-series-tutorials/webscripts/tutorial/tutorial.html
https://docs.alfresco.com/content-services/6.2/develop/repo-ext-points/web-scripts/
Give me more details about what is your expectation and I'll try to help you
Cheers!
Explore our Alfresco products with the links below. Use labels to filter content by product module.