As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
Map<String, Serializable> params = new HashMap<String, Serializable>(1); params.put("aspect-name", ContentModel.ASPECT_VERSIONABLE); Rule rule = createRule( RuleType.INBOUND, AddFeaturesActionExecuter.NAME, params, NoConditionEvaluator.NAME, null); ruleService.saveRule(nodeRef, rule); …… private Rule createRule( String ruleTypeName, String actionName, Map<String, Serializable> actionParams, String conditionName, Map<String, Serializable> conditionParams) { Rule rule = new Rule(); rule.setRuleType(ruleTypeName); Action action = this.actionService.createAction(actionName, actionParams); ActionCondition condition = this.actionService.createActionCondition(conditionName, conditionParams); action.addActionCondition(condition); rule.setAction(action); return rule; }