Skip to content

Commit

Permalink
Add dead end decision (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
longquanzheng committed May 19, 2023
1 parent d0397b3 commit 8c170f7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions iwf/state_decision.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ func ForceFailWorkflow(output interface{}) *StateDecision {
}
}

var DeadEnd = &StateDecision{
NextStates: []StateMovement{
{
NextStateId: DeadEndStateId,
},
},
}

var GracefulCompletingWorkflow = GracefulCompleteWorkflow(nil)

func GracefulCompleteWorkflow(output interface{}) *StateDecision {
Expand Down
1 change: 1 addition & 0 deletions iwf/state_movement.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const (
GracefulCompletingWorkflowStateId = "_SYS_GRACEFUL_COMPLETING_WORKFLOW"
ForceCompletingWorkflowStateId = "_SYS_FORCE_COMPLETING_WORKFLOW"
ForceFailingWorkflowStateId = "_SYS_FORCE_FAILING_WORKFLOW"
DeadEndStateId = "_SYS_DEAD_END"
)

func NewStateMovement(st WorkflowState, in interface{}) StateMovement {
Expand Down

0 comments on commit 8c170f7

Please sign in to comment.