Class EventActionInfo

java.lang.Object
com.mendix.core.actionmanagement.EventActionInfo

public class EventActionInfo extends Object
Represents an event action.
  • Field Details

    • actionName

      public final String actionName
    • raiseExceptionOnFalse

      public final boolean raiseExceptionOnFalse
  • Constructor Details

    • EventActionInfo

      public EventActionInfo(String classOrActionName, boolean raiseExceptionOnFalse)
      Creates an event action with the specified name.
      Parameters:
      classOrActionName - the name of the custom Java action or microflow
      raiseExceptionOnFalse - whether to throw an exception if the action returns false
    • EventActionInfo

      @Deprecated public EventActionInfo(Consumer<IMendixObject> consumer, Class<IMendixObject> returnType)
      Deprecated.
      since 11.0. Use EventActionInfo(Consumer).
      Creates an event action with the specified Java action. The action will not raise an exception when its result is false.
      Parameters:
      consumer - the Java function to execute
      returnType - the Java type of the result value
    • EventActionInfo

      @Deprecated public EventActionInfo(Consumer<IMendixObject> consumer, Class<IMendixObject> returnType, boolean raiseExceptionOnFalse)
      Deprecated.
      Creates an event action with the specified Java action.
      Parameters:
      consumer - the Java function to execute
      returnType - the Java type of the result value
      raiseExceptionOnFalse - whether to throw an exception if the action returns false
    • EventActionInfo

      public EventActionInfo(Consumer<IMendixObject> consumer)
      Creates an event action with the specified Java function. The action will not raise an exception when its result is false.
      Parameters:
      consumer - the Java function to execute
    • EventActionInfo

      public EventActionInfo(Consumer<IMendixObject> consumer, boolean raiseExceptionOnFalse)
      Creates an event action with the specified Java function.
      Parameters:
      consumer - the Java function to execute
      raiseExceptionOnFalse - whether to throw an exception if the action returns false
  • Method Details

    • representsFunction

      @Deprecated public Boolean representsFunction()
      Deprecated.
      since 11.0. Use function() to check whether this `EventActionInfo` represents a function.
      Returns whether the event action is a Java function or not.
      Returns:
      true if the action is a function; false otherwise
    • function

      public Consumer<IMendixObject> function()
      Returns the Java function for this event action.
      Returns:
      the function if defined; null otherwise
    • getReturnType

      @Deprecated public Class<IMendixObject> getReturnType()
      Deprecated.
      since 11.0. There is no replacement as this return type is not used.
      Returns the Java type of the result value.
      Returns:
      the Java type of the result value