@Tags(value={"rules","rules engine","script","invoke","groovy","python","jython","jruby","ruby","javascript","js","lua","luaj"}) @CapabilityDescription(value="Allows the user to provide a scripted RulesEngineService for custom firing of rules depending on the supplied facts. The script must set a variable \'rulesEngine\' to an implementation of RulesEngineService.") @Restricted(restrictions=@Restriction(requiredPermission=EXECUTE_CODE,explanation="Provides operator the ability to execute arbitrary code assuming all permissions that NiFi has.")) public class ScriptedRulesEngine extends AbstractScriptedControllerService implements RulesEngineService
| Modifier and Type | Field and Description |
|---|---|
protected AtomicReference<RulesEngineService> |
rulesEngine |
configurationContext, scriptEngine, scriptingComponentHelper, scriptNeedsReload, validationResults| Constructor and Description |
|---|
ScriptedRulesEngine() |
| Modifier and Type | Method and Description |
|---|---|
List<Action> |
fireRules(Map<String,Object> facts) |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors()
Returns a list of property descriptors supported by this processor.
|
void |
onEnabled(ConfigurationContext context) |
protected boolean |
reloadScript(String scriptBody)
Reloads the script RulesEngineService.
|
void |
setup() |
customValidate, getSupportedDynamicPropertyDescriptor, onPropertyModified, reloadScriptBody, reloadScriptFileabstractClearConfigContext, abstractStoreConfigContext, disabled, enabled, getConfigurationContext, getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, getProperty, getStateManager, init, initialize, isEnabledequals, getPropertyDescriptor, getPropertyDescriptors, hashCode, toString, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitinitializegetIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateprotected final AtomicReference<RulesEngineService> rulesEngine
protected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractScriptedControllerServicepublic void setup()
setup in class AbstractScriptedControllerServiceprotected boolean reloadScript(String scriptBody)
reloadScript in class AbstractScriptedControllerServicescriptBody - An input stream associated with the script content@OnEnabled public void onEnabled(ConfigurationContext context)
onEnabled in class AbstractScriptedControllerServiceCopyright © 2021 Apache NiFi Project. All rights reserved.