com.jscape.inet.mft.workflow
Class AbstractAction

java.lang.Object
  extended by 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/interfaces inherited from interface com.jscape.inet.mft.workflow.Action
Action.ActionException
 
Field Summary
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
 void execute(com.jscape.util.event.EventContext context, java.lang.String triggerName)
          Executes action for specified event context and trigger name.
 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 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 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

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

Method Detail

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

setEventContext

public void setEventContext(java.util.Map<java.lang.String,java.lang.Object> value)
Description copied from interface: Action
Sets action event context as a map of event property name to property value.

Specified by:
setEventContext in interface Action
Parameters:
value - event context

execute

public void execute(com.jscape.util.event.EventContext context,
                    java.lang.String triggerName)
             throws Action.ActionException
Description copied from interface: Action
Executes action for specified event context and trigger name.

Specified by:
execute in interface Action
Parameters:
context - an event context
triggerName - a trigger name
Throws:
Action.ActionException - if an execution error occurs


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