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.inet.mftserver.operation.Domain domain, com.jscape.inet.mft.events.DomainEvent event, ExpressionContext expressionContext, java.lang.String triggerName, java.lang.String triggerTaskId)`
    `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.Object` | `getResult()`
    `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` | `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

    - #### getResult

          java.lang.Object getResult()

    - #### isSuccess

          boolean isSuccess()

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

    - #### 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.inet.mftserver.operation.Domain domain,
                       com.jscape.inet.mft.events.DomainEvent event,
                       ExpressionContext expressionContext,
                       java.lang.String triggerName,
                       java.lang.String triggerTaskId)
                throws Action.ActionException

      Throws:
        `Action.ActionException`

Copyright © 2009-2022. Redwood Software Inc. All rights reserved.