public interface Action
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION |
Modifier and Type | Method and Description |
---|---|
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.
|
static final java.lang.String CLASS_VERSION
void configure(java.lang.Object pConfiguration) throws ProcessException, java.lang.UnsupportedOperationException
This operation is optional. If the action does not need to be configured, it can simply throw an UnsupportedOperationException.
ProcessException
- if the action could not be configured
- for example, because some of the required properties are
missing from the configurationjava.lang.UnsupportedOperationException
- if this action is not
configurablevoid initialize(java.util.Map pParameters) throws ProcessException
ProcessException
- if the action could not be properly
initialized - for example, if not all of the required parameters
are present in the MapExpression
void execute(ProcessExecutionContext pContext) throws ActionException
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 contextvoid execute(ProcessExecutionContext[] pContexts) throws ActionException
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.
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