atg.process.action
Interface Action

All Known Implementing Classes:
ActionImpl, AddBusinessProcessStage, AddItemToOrder, AddMarkerToItem, AddMarkerToOrder, AddMarkerToProfile, AverageOrderAction, BusinessProcessStageAction, ConvertAbandonedOrder, FilterSlot, LogPromotionInfo, MarkerAction, PromotionAction, ReanimateAbandonedOrder, RemoveAllMarkersFromItem, RemoveAllMarkersFromOrder, RemoveAllMarkersFromProfile, RemoveBusinessProcessStage, RemoveMarkersFromItem, RemoveMarkersFromOrder, RemoveMarkersFromProfile, RemovePromotionAction, SendObjectAsXML, SetLastUpdated

public interface Action

A process action.


Field Summary
static java.lang.String CLASS_VERSION
           
 
Method Summary
 void configure(java.lang.Object pConfiguration)
          Configures the action using the given configuration object.
 void execute(ProcessExecutionContext pContext)
          Executes the action in the given process execution context.
 void execute(ProcessExecutionContext[] pContexts)
          Executes the action in each of the given process execution contexts.
 void initialize(java.util.Map pParameters)
          Initializes the action with the given parameters.
 

Field Detail

CLASS_VERSION

static final java.lang.String CLASS_VERSION
See Also:
Constant Field Values
Method Detail

configure

void configure(java.lang.Object pConfiguration)
               throws ProcessException,
                      java.lang.UnsupportedOperationException
Configures the action using the given configuration object. The configuration object is typically a global Nucleus component which is configured with the information necessary for the action's operation.

This operation is optional. If the action does not need to be configured, it can simply throw an UnsupportedOperationException.

Throws:
ProcessException - if the action could not be configured - for example, because some of the required properties are missing from the configuration
java.lang.UnsupportedOperationException - if this action is not configurable

initialize

void initialize(java.util.Map pParameters)
                throws ProcessException
Initializes the action with the given parameters. The keys in the parameter Map are the String parameter names; the values are the Expression objects representing parameter values.

Throws:
ProcessException - if the action could not be properly initialized - for example, if not all of the required parameters are present in the Map
See Also:
Expression

execute

void execute(ProcessExecutionContext pContext)
             throws ActionException
Executes the action in the given process execution context. The context can be used to evaluate any parameter Expressions.

Throws:
ActionException - if the action failed when executed in this context; the process engine will catch the ActionException and respond based on the value of the action's error response, as specified in the ActionException itself and/or the action registry; for example, the engine may ignore the error and continue, or it may delete the process instance pointed to by the context and stop executing the process segment in this context

execute

void execute(ProcessExecutionContext[] pContexts)
             throws ActionException
Executes the action in each of the given process execution contexts. Each context can be used to evaluate any parameter Expressions.

If an error occurs when executing the action in one of the given contexts, this method should still try to execute the action in the rest of the contexts before throwing an exception. In the end, an ActionException should be thrown with a FailedActionInfo entry for each failed process execution context.

Throws:
ActionException - if the action failed when executed in any of the given contexts; the process engine will catch the ActionException and, for each failed context, respond based on the value of the action's error response, as specified in the ActionException itself and/or the action registry; for example, the engine may ignore the error and continue, or it may delete the process instance pointed to by the context and stop executing the process segment in that context