com.jscape.inet.mft.workflow

## Class AbstractAction

- java.lang.Object
- - com.jscape.inet.mft.workflow.AbstractAction

- All Implemented Interfaces:
    Action

      public abstract class AbstractAction
      extends java.lang.Object
      implements Action

  Introduces a basic implementation of the `Action` interface and simplifies further actions development.
  Author:
    Alex

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `AbstractAction.LogActionField`

    - ### Nested classes/interfaces inherited from interface com.jscape.inet.mft.workflow.Action

      `Action.ActionException`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static PropertyDescriptor` | `ACTION_PRIORITY_DESCRIPTOR` A property descriptor for 'Priority' property.
    `static int` | `DEFAULT_PRIORITY` Default action priority.
    `static PropertyDescriptor` | `LOG_ACTION_DESCRIPTOR` A property descriptor for 'LogAction' property.
    `static PropertyDescriptor` | `TRIGGER_ERROR_MESSAGE_DESCRIPTOR` A property descriptor for 'TriggerErrorMessage' property.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `execute(com.jscape.inet.mftserver.operation.Domain domain, com.jscape.inet.mft.events.DomainEvent event, java.util.Map<java.lang.String,java.lang.Object> eventProperties, java.lang.String triggerName, java.lang.String triggerTaskId)`
    `int` | `getPriority()` Returns the action priority.
    `java.lang.String` | `getPropertyDescription(java.lang.String propertyName)` Returns action property description.
    `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` | `setLogAction(boolean value)` Sets action loggable flag.
    `void` | `setPriority(int value)` Sets the action priority.
    `void` | `setTriggerErrorMessage(java.lang.String value)`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.jscape.inet.mft.workflow.Action

      `getDescription, getPropertyDescriptors`

- - ### Field Detail

    - #### ACTION_PRIORITY_DESCRIPTOR

          public static final PropertyDescriptor ACTION_PRIORITY_DESCRIPTOR

      A property descriptor for 'Priority' property.

    - #### TRIGGER_ERROR_MESSAGE_DESCRIPTOR

          public static final PropertyDescriptor TRIGGER_ERROR_MESSAGE_DESCRIPTOR

      A property descriptor for 'TriggerErrorMessage' property.

    - #### LOG_ACTION_DESCRIPTOR

          public static final PropertyDescriptor LOG_ACTION_DESCRIPTOR

      A property descriptor for 'LogAction' property.

    - #### DEFAULT_PRIORITY

          public static final int DEFAULT_PRIORITY

      Default action priority.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getPropertyDescription

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

      Description copied from interface: `Action`
      Returns action property description. Used for creating action properties help panel in Manager GUI.
      Specified by:
        `getPropertyDescription` in interface `Action`
      Parameters:
        `propertyName` - the property name
      Returns:
        property description text

    - #### getPropertyExample

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

      Description copied from interface: `Action`
      Returns action property usage example. Used for creating action properties help panel in Manager GUI.
      Specified by:
        `getPropertyExample` in interface `Action`
      Parameters:
        `propertyName` - the property name
      Returns:
        property usage example

    - #### isLogAction

          public boolean isLogAction()

      Description copied from interface: `Action`
      Returns action loggable flag.
      Specified by:
        `isLogAction` in interface `Action`
      Returns:
        `true` if action should be logged; `false` otherwise

    - #### setLogAction

          public void setLogAction(boolean value)

      Description copied from interface: `Action`
      Sets action loggable flag.
      Specified by:
        `setLogAction` in interface `Action`
      Parameters:
        `value` - if `true` action will be logged

    - #### getTriggerName

          public java.lang.String getTriggerName()

      Description copied from interface: `Action`
      Returns parent trigger name.
      Specified by:
        `getTriggerName` in interface `Action`
      Returns:
        parent trigger name

    - #### getResultMessage

          public java.lang.String getResultMessage()

      Description copied from interface: `Action`
      Returns result message for logging.
      Specified by:
        `getResultMessage` in interface `Action`
      Returns:
        a result message

    - #### getTriggerErrorMessage

          public java.lang.String getTriggerErrorMessage()

      Description copied from interface: `Action`
      Returns an error message passed to Trigger Error Event.
      Specified by:
        `getTriggerErrorMessage` in interface `Action`
      Returns:
        an error message

    - #### setTriggerErrorMessage

          public void setTriggerErrorMessage(java.lang.String value)

    - #### isSuccess

          public boolean isSuccess()

      Description copied from interface: `Action`
      Returns action success flag.
      Specified by:
        `isSuccess` in interface `Action`
      Returns:
        `true` if action was successful executed; `false` otherwise

    - #### getPriority

          public int getPriority()

      Description copied from interface: `Action`
      Returns the action priority.
      Specified by:
        `getPriority` in interface `Action`
      Returns:
        the action priority

    - #### setPriority

          public void setPriority(int value)

      Description copied from interface: `Action`
      Sets the action priority.
      Specified by:
        `setPriority` in interface `Action`
      Parameters:
        `value` - the action priority

    - #### execute

          public void execute(com.jscape.inet.mftserver.operation.Domain domain,
                              com.jscape.inet.mft.events.DomainEvent event,
                              java.util.Map<java.lang.String,java.lang.Object> eventProperties,
                              java.lang.String triggerName,
                              java.lang.String triggerTaskId)
                       throws Action.ActionException

      Specified by:
        `execute` in interface `Action`
      Throws:
        `Action.ActionException`

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