public abstract class Task extends AbstractStep
AbstractStep.execute(org.apache.wiki.api.core.Context). 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.
TIME_NOT_SET| Constructor and Description |
|---|
Task(int workflowId,
java.util.Map<java.lang.String,java.io.Serializable> workflowContext,
java.lang.String messageKey)
Constructs a new instance of a Task, with an associated Workflow and message key.
|
Task(java.lang.String messageKey)
Public constructor that creates a new Task with a specified message key.
|
| Modifier and Type | Method and Description |
|---|---|
java.security.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, getMessageKey, getOutcome, getStartTime, getSuccessor, getWorkflowContext, getWorkflowId, isCompleted, isStarted, setOutcome, setWorkflow, startpublic Task(java.lang.String messageKey)
AbstractStep.setWorkflow(int, Map) 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(int workflowId, java.util.Map<java.lang.String,java.io.Serializable> workflowContext, java.lang.String messageKey)
workflowId - the parent workflow id to setworkflowContext - the parent workflow context to setmessageKey - the i18n message keypublic final java.security.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 (c) 2001-2022 The Apache Software Foundation. All rights reserved.