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
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
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!
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.