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