Add ability for scripts to create unmanaged rules (#1897)
Signed-off-by: Jonathan Gilbert <jpg@trillica.com>pull/2161/head
parent
f0c9a8434d
commit
f1a3d824ac
|
@ -106,6 +106,14 @@ public class ScriptedAutomationManager {
|
|||
}
|
||||
|
||||
public Rule addRule(Rule element) {
|
||||
Rule rule = addUnmanagedRule(element);
|
||||
|
||||
ruleRegistryDelegate.add(rule);
|
||||
|
||||
return rule;
|
||||
}
|
||||
|
||||
public Rule addUnmanagedRule(Rule element) {
|
||||
RuleBuilder builder = RuleBuilder.create(element.getUID());
|
||||
|
||||
String name = element.getName();
|
||||
|
@ -173,7 +181,6 @@ public class ScriptedAutomationManager {
|
|||
|
||||
Rule rule = builder.build();
|
||||
|
||||
ruleRegistryDelegate.add(rule);
|
||||
return rule;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue