public abstract class Task extends AbstractStep
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 and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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. |
addError, addSuccessor, execute, getAvailableOutcomes, getEndTime, getErrors, getMessageArguments, getMessageKey, getOutcome, getOwner, getStartTime, getSuccessor, getWorkflow, isCompleted, isStarted, setOutcome, setWorkflow, startpublic 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 final Principal getActor()
SystemPrincipal.SYSTEM_USER.getActor in interface StepgetActor in class AbstractSteppublic 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.Copyright © 2001-2019 The Apache Software Foundation. All rights reserved.