Exemple #1
0
 public void Configure(TravelRequestStateMachineContext context)
 {
     context.StateMachine.Configure(TravelRequestState.New)
     .Permit(TravelRequestAction.Init, TravelRequestState.Captured);
 }
 public void Configure(TravelRequestStateMachineContext context)
 {
     context.StateMachine.Configure(TravelRequestState.BookTickets)
     .Permit(TravelRequestAction.Finish, TravelRequestState.BookingComplete);
 }
 public void Configure(TravelRequestStateMachineContext context)
 {
     context.StateMachine.Configure(TravelRequestState.Captured)
     .PermitIf(TravelRequestAction.Submit, TravelRequestState.TravelerReview, () => context.CurrentTravelRequest.IsEmployee)
     .PermitIf(TravelRequestAction.Submit, TravelRequestState.HRApproval, () => !context.CurrentTravelRequest.IsEmployee);
 }