public class NextAction extends ModelObject
| Modifier and Type | Method and Description |
|---|---|
org.joda.time.DateTime |
getActivation()
Return the time after which the workflow should be activated.
|
WorkflowState |
getNextState()
Return the next state of the workflow.
|
String |
getReason()
Return the reason for the next action.
|
boolean |
isRetry()
Return true if this action is a retry of the current state.
|
static NextAction |
moveToState(WorkflowState nextState,
String reason)
Schedule processing of state
nextState immediately. |
static NextAction |
moveToStateAfter(WorkflowState nextState,
org.joda.time.DateTime activation,
String reason)
Schedule processing of state
nextState at time activation. |
static NextAction |
retryAfter(org.joda.time.DateTime activation,
String reason)
Schedule retry for current state at time
activation. |
static NextAction |
stopInState(WorkflowState finalState,
String reason)
Set next state to
finalState and do not schedule its
processing. |
equals, hashCode, toStringpublic org.joda.time.DateTime getActivation()
public WorkflowState getNextState()
public String getReason()
public static NextAction retryAfter(org.joda.time.DateTime activation, String reason)
activation.activation - The time after which the workflow can be activated.reason - The reason for the action.NextAction value.public static NextAction moveToStateAfter(WorkflowState nextState, org.joda.time.DateTime activation, String reason)
nextState at time activation.nextState - The next workflow state.activation - The time after which the workflow can be activated.reason - The reason for the action.NextAction value.public static NextAction moveToState(WorkflowState nextState, String reason)
nextState immediately.nextState - The next workflow state.reason - The reason for the action.NextAction value.public static NextAction stopInState(WorkflowState finalState, String reason)
finalState and do not schedule its
processing. The finalState workflow state type must
be final, e.g. it must be either end state or manual state.
The state handler method of the state, even if it exists, is
not executed. Additionally, there is no workflow action
recorded for the finalState. If you want to execute
the state handler method and record a workflow action, use
one of the moveToState methods instead.finalState - Final workflow state (end state or manual state).reason - The reason for the action.NextAction value.public boolean isRetry()
Copyright © 2014–2020 Nitor Creations. All rights reserved.