Exemple #1
0
func (w *WorkerFSM) Two() fsm.Decider {
	return fsm.NewComposedDecider(
		fsm.OnActivityFailedTimedOutCanceled("two", fsm.AddDecision(w.actTwo)),
		fsm.OnActivityCompleted("two",
			fsm.UpdateState(w.afterTwo),
			fsm.CompleteWorkflow(),
		),
	)
}
Exemple #2
0
func (w *WorkerFSM) One() fsm.Decider {
	return fsm.NewComposedDecider(
		fsm.OnActivityFailedTimedOutCanceled("one", fsm.AddDecision(w.actOne)),
		fsm.OnActivityCompleted("one",
			fsm.UpdateState(w.afterOne),
			fsm.AddDecision(w.actTwo),
			fsm.Transition("Two"),
		),
	)
}