|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jboss.jbossnetwork.product.jbpm.handlers.BaseHandler
public abstract class BaseHandler
Base class for all of our JBPM handlers, providing some basic functionality for transitioning between steps.
| Field Summary | |
|---|---|
protected org.apache.commons.logging.Log |
logger
Logger, keyed to the subclass. |
protected static String |
MESSAGE_NO_CHANGES
Standard message to describe that no changes were made by the currently executing step. |
protected static String |
TRANSITION_ERROR
Describes an error in a step, preventing transitioning. |
protected static String |
TRANSITION_SUCCESS
Describes a successful transition between steps. |
| Constructor Summary | |
|---|---|
BaseHandler()
|
|
| Method Summary | |
|---|---|
protected void |
checkProperties()
Ensures the property values that were set in substituteVariables(org.jbpm.graph.exe.ExecutionContext)
are valid. |
protected void |
complete(org.jbpm.graph.exe.ExecutionContext executionContext,
String message)
Called by a handler at the end of its processing to indicate a step was completed successfully and transitions to the next step in the workflow. |
protected void |
error(org.jbpm.graph.exe.ExecutionContext executionContext,
Throwable throwable,
String additionalMessage,
String leavingTransition)
Called by a handler at the end of its processing to indicate an error occurred in the execution of a given step and closes out the step. |
void |
execute(org.jbpm.graph.exe.ExecutionContext executionContext)
|
abstract String |
getDescription()
Returns a user readable description of what the step in the workflow entails. |
protected void |
notRun(org.jbpm.graph.exe.ExecutionContext executionContext,
String message)
Called by a handler at the end of its processing to indicate a step was skipped and transitions to the next step in the workflow. |
abstract void |
run(org.jbpm.graph.exe.ExecutionContext executionContext)
Tells the handle implementation to actually perform the step indicated. |
void |
setPropertyDefaults()
Sets the default values for properties used by the handler implementation. |
protected void |
skip(org.jbpm.graph.exe.ExecutionContext executionContext,
ActionHandlerException exception,
String additionalMessage,
String leavingTransition)
Called by a handler at the end of its processing to indicate a step in the workflow has been skipped and transitions to the next step in the workflow. |
protected String |
substituteVariable(String expression,
org.jbpm.graph.exe.ExecutionContext executionContext)
Substitutes in values found in the workflow (execution context) for the specified expression. |
void |
substituteVariables(org.jbpm.graph.exe.ExecutionContext executionContext)
Requests the action handler substitute into its node any variables necessary, taking the values for these from the provided execution context. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String TRANSITION_SUCCESS
protected static final String TRANSITION_ERROR
protected static final String MESSAGE_NO_CHANGES
protected final org.apache.commons.logging.Log logger
| Constructor Detail |
|---|
public BaseHandler()
| Method Detail |
|---|
public abstract String getDescription()
nullpublic abstract void run(org.jbpm.graph.exe.ExecutionContext executionContext)
executionContext - cannot be nullpublic void setPropertyDefaults()
public void substituteVariables(org.jbpm.graph.exe.ExecutionContext executionContext)
throws ActionHandlerException
executionContext - JBPM execution context from which the property values should be extracted
ActionHandlerException - if there is an error extraction or substituting the variables
protected void checkProperties()
throws ActionHandlerException
substituteVariables(org.jbpm.graph.exe.ExecutionContext)
are valid. This may optionally be overridden by action handler implementations if necessary.
ActionHandlerException - if any of the properties are invalid
public void execute(org.jbpm.graph.exe.ExecutionContext executionContext)
throws Exception
execute in interface org.jbpm.graph.def.ActionHandlerException
protected void error(org.jbpm.graph.exe.ExecutionContext executionContext,
Throwable throwable,
String additionalMessage,
String leavingTransition)
executionContext - context in which the step was executingthrowable - exception that occurred to trigger this call to erroradditionalMessage - additional details to report on the stepleavingTransition - ?
protected void complete(org.jbpm.graph.exe.ExecutionContext executionContext,
String message)
executionContext - context in which the step was executingmessage - additional details on the step
protected void skip(org.jbpm.graph.exe.ExecutionContext executionContext,
ActionHandlerException exception,
String additionalMessage,
String leavingTransition)
executionContext - context in which the step was executingexception - exception that occurred to trigger this call to erroradditionalMessage - additional details to report on the stepleavingTransition - ?
protected void notRun(org.jbpm.graph.exe.ExecutionContext executionContext,
String message)
executionContext - context in which the step was executingmessage - additional details on the step
protected String substituteVariable(String expression,
org.jbpm.graph.exe.ExecutionContext executionContext)
throws ActionHandlerException
expression - expression into which to substitute values from the workflowexecutionContext - context describing the workflow
null if the expression is
null
ActionHandlerException - if there is an error during the substitution
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||