|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wiki.workflow.AbstractStep
org.apache.wiki.workflow.Task
public abstract class Task
AbstractStep subclass that executes instructions, uninterrupted, and results
in an Outcome. Concrete classes only need to implement AbstractStep.execute()
.
When the execution step completes, execute
must return
Outcome.STEP_COMPLETE
, Outcome.STEP_CONTINUE
or
Outcome.STEP_ABORT
. Subclasses can add any errors by calling the
helper method AbstractStep.addError(String)
. The execute method should
generally capture and add errors to the error list instead of
throwing a WikiException.
Constructor Summary | |
---|---|
Task(String messageKey)
Protected constructor that creates a new Task with a specified message key. |
|
Task(Workflow workflow,
String messageKey)
Constructs a new instance of a Task, with an associated Workflow and message key. |
Method Summary | |
---|---|
Principal |
getActor()
Returns SystemPrincipal.SYSTEM_USER . |
Step |
getSuccessor()
Identifies the next Step after this Task finishes successfully. |
void |
setSuccessor(Step step)
Sets the successor Step to this one, which will be triggered if the Task completes successfully (that is, Step.getOutcome() returns
Outcome.STEP_COMPLETE . |
Methods inherited from class org.apache.wiki.workflow.AbstractStep |
---|
addError, addSuccessor, execute, getAvailableOutcomes, getEndTime, getErrors, getMessageArguments, getMessageKey, getOutcome, getOwner, getStartTime, getSuccessor, getWorkflow, isCompleted, isStarted, setOutcome, setWorkflow, start |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Task(String messageKey)
AbstractStep.setWorkflow(Workflow)
should be
called.
messageKey
- the Step's message key, such as
decision.editPageApproval
. By convention, the
message prefix should be a lower-case version of the Step's
type, plus a period (e.g., task.
and decision.
).public Task(Workflow workflow, String messageKey)
workflow
- the associated workflowmessageKey
- the i18n message keyMethod Detail |
---|
public final Principal getActor()
SystemPrincipal.SYSTEM_USER
.
getActor
in interface Step
getActor
in class AbstractStep
public final void setSuccessor(Step step)
Step.getOutcome()
returns
Outcome.STEP_COMPLETE
. This method is really a convenient
shortcut for Step.addSuccessor(Outcome, Step)
, where the first
parameter is Outcome.STEP_COMPLETE
.
step
- the successorpublic final Step getSuccessor()
setSuccessor(Step)
, regardless of the current completion state.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |