com.jscape.inet.mft.workflow

## Interface Action

- All Known Implementing Classes:
    AbstractAction

      public interface Action

  Represents an abstraction for executing custom tasks if an event occurs. Action is executed only once after creation. The interface introduces methods and properties required by action invocation infrastructure.
  Author:
    Alex Usun

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `Action.ActionException` Represents an action execution error.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `execute(com.jscape.util.event.EventContext context, java.lang.String triggerName)` Executes action for specified event context and trigger name.
    `java.lang.String` | `getDescription()` Returns action description used in Manager GUI.
    `int` | `getPriority()` Returns the action priority.
    `java.lang.String` | `getPropertyDescription(java.lang.String propertyName)` Returns action property description.
    `PropertyDescriptor[]` | `getPropertyDescriptors()` Returns action properties descriptors used for creating action properties panel in Manager GUI.
    `java.lang.String` | `getPropertyExample(java.lang.String propertyName)` Returns action property usage example.
    `java.lang.String` | `getResultMessage()` Returns result message for logging.
    `java.lang.String` | `getTriggerErrorMessage()` Returns an error message passed to Trigger Error Event.
    `java.lang.String` | `getTriggerName()` Returns parent trigger name.
    `boolean` | `isLogAction()` Returns action loggable flag.
    `boolean` | `isSuccess()` Returns action success flag.
    `void` | `setEvent(java.lang.Object event)` Sets the event object.
    `void` | `setEventContext(java.util.Map<java.lang.String,java.lang.Object> value)` Sets action event context as a map of event property name to property value.
    `void` | `setLogAction(boolean value)` Sets action loggable flag.
    `void` | `setPriority(int value)` Sets the action priority.

- - ### Method Detail

    - #### getDescription

          java.lang.String getDescription()

      Returns action description used in Manager GUI.
      Returns:
        action description text

    - #### getPropertyDescription

          java.lang.String getPropertyDescription(java.lang.String propertyName)

      Returns action property description. Used for creating action properties help panel in Manager GUI.
      Parameters:
        `propertyName` - the property name
      Returns:
        property description text

    - #### getPropertyExample

          java.lang.String getPropertyExample(java.lang.String propertyName)

      Returns action property usage example. Used for creating action properties help panel in Manager GUI.
      Parameters:
        `propertyName` - the property name
      Returns:
        property usage example

    - #### getPropertyDescriptors

          PropertyDescriptor[] getPropertyDescriptors()

      Returns action properties descriptors used for creating action properties panel in Manager GUI.
      Returns:
        action properties descriptors

    - #### isLogAction

          boolean isLogAction()

      Returns action loggable flag.
      Returns:
        `true` if action should be logged; `false` otherwise

    - #### setLogAction

          void setLogAction(boolean value)

      Sets action loggable flag.
      Parameters:
        `value` - if `true` action will be logged

    - #### getTriggerName

          java.lang.String getTriggerName()

      Returns parent trigger name.
      Returns:
        parent trigger name

    - #### getTriggerErrorMessage

          java.lang.String getTriggerErrorMessage()

      Returns an error message passed to Trigger Error Event.
      Returns:
        an error message

    - #### getResultMessage

          java.lang.String getResultMessage()

      Returns result message for logging.
      Returns:
        a result message

    - #### isSuccess

          boolean isSuccess()

      Returns action success flag.
      Returns:
        `true` if action was successful executed; `false` otherwise

    - #### setEvent

          void setEvent(java.lang.Object event)

      Sets the event object.
      Parameters:
        `event` - an event object

    - #### setEventContext

          void setEventContext(java.util.Map<java.lang.String,java.lang.Object> value)

      Sets action event context as a map of event property name to property value.
      Parameters:
        `value` - event context

    - #### getPriority

          int getPriority()

      Returns the action priority.
      Returns:
        the action priority

    - #### setPriority

          void setPriority(int value)

      Sets the action priority.
      Parameters:
        `value` - the action priority

    - #### execute

          void execute(com.jscape.util.event.EventContext context,
                       java.lang.String triggerName)
                throws Action.ActionException

      Executes action for specified event context and trigger name.
      Parameters:
        `context` - an event context
        `triggerName` - a trigger name
      Throws:
        `Action.ActionException` - if an execution error occurs

Copyright © JSCAPE LLC. 1999-2019. All Rights Reserved