public static EventActivityBinder <JobAttemptSaga, T> ScheduleJobStatusCheck <T>(this EventActivityBinder <JobAttemptSaga, T> binder, JobAttemptStateMachine machine) where T : class { return(binder.Schedule(machine.StatusCheckRequested, x => x.Init <JobStatusCheckRequested>(new { AttemptId = x.Instance.CorrelationId }))); }
public static EventActivityBinder <JobSaga, T> WaitForJobSlot <T>(this EventActivityBinder <JobSaga, T> binder, JobStateMachine machine) where T : class { return(binder.Schedule(machine.JobSlotWaitElapsed, context => context.Init <JobSlotWaitElapsed>(new { JobId = context.Instance.CorrelationId })) .TransitionTo(machine.WaitingForSlot)); }