Interface ActionHandler

All Superinterfaces:
ModuleHandler
All Known Implementing Classes:
BaseActionModuleHandler

@NonNullByDefault public interface ActionHandler extends ModuleHandler
This interface should be implemented by external modules which provide functionality for processing Action modules. This functionality is called to execute the Actions of the Rule when it is needed.
Author:
Yordan Mihaylov - Initial contribution, Ana Dimova - Initial contribution, Vasil Ilchev - Initial contribution
See Also:
  • Method Details

    • compile

      default void compile() throws Exception
      Called to compile an Action of the Rule when the rule is initialized.
      Throws:
      Exception - if the compilation fails
    • execute

      @Nullable Map<String,Object> execute(Map<String,Object> context)
      Called to execute an Action of the Rule when it is needed.
      Parameters:
      context - an unmodifiable map containing the outputs of the Trigger that triggered the Rule, the outputs of all preceding Actions, and the inputs for this Action.
      Returns:
      a map with the outputs which are the result of the Action's execution (may be null).