Skip to content

Commit

Permalink
Update workflows to latest API
Browse files Browse the repository at this point in the history
  • Loading branch information
jsyrjala committed Dec 1, 2014
1 parent 972f638 commit 7e99dc3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class ConstantWorkflow extends WorkflowDefinition<ConstantWorkflow.Consta
public static enum ConstantState implements WorkflowState {
start(WorkflowStateType.start, "Start"), quickState("This executes fast then goes to retryTwice"), retryTwiceState(
"Retries twice and goes then goes to scheduleState"), scheduleState("Goes to slowState, in 3 sec"), slowState(
"This executes bit slower. Goes to end"), end(WorkflowStateType.end, "End"), error("Error. Should not be used.");
"This executes bit slower. Goes to end"), end(WorkflowStateType.end, "End"), error(WorkflowStateType.end, "Error. Should not be used.");
private final WorkflowStateType type;
private final String description;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static enum QuickState implements WorkflowState {
state3("state3"),
state4("state4"),
state5("state5"),
end("end");
end(WorkflowStateType.end, "end");

private final WorkflowStateType type;
private final String description;
Expand Down Expand Up @@ -44,7 +44,7 @@ public String getDescription() {
}

public NoDelaysWorkflow() {
super(NoDelaysWorkflow.class.getSimpleName(), QuickState.state1, QuickState.state5);
super(NoDelaysWorkflow.class.getSimpleName(), QuickState.state1, QuickState.end);
}

public NextAction state1(StateExecution execution) {
Expand All @@ -68,7 +68,4 @@ public NextAction state5(StateExecution execution) {
return NextAction.stopInState(QuickState.end, "");
}

public NextAction end(StateExecution execution) {
return null;
}
}

0 comments on commit 7e99dc3

Please sign in to comment.