11-02-2010 08:53 AM
11-02-2010 09:16 AM
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;
}
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.