Skip to content

Instantly share code, notes, and snippets.

@HarryMcCarney
Created March 10, 2014 21:15
Show Gist options
  • Save HarryMcCarney/9474504 to your computer and use it in GitHub Desktop.
Save HarryMcCarney/9474504 to your computer and use it in GitHub Desktop.
Model Release Life Cycle
private void NextStep()
{
switch(PreviousStep())
{
case Status.Pending:
IWorkFlowStep = new CreatePeopleCountHit(Release, TurkSource);
break;
case Status.SentForPeopleCount:
IWorkFlowStep = new FetchPeopleCountHitResult(Release, TurkSource);
break;
case Status.PeopleCounted:
IWorkFlowStep = new CreateReviewHit(Release, TurkSource);
break;
case Status.SentForIntialReview:
IWorkFlowStep = new FetchReviewHitResult(Release, TurkSource);
break;
case Status.IntialReviewCompleted:
IWorkFlowStep = new CreateReviewHit(Release, TurkSource);
break;
case Status.SentForPeerReview:
IWorkFlowStep = new FetchReviewHitResult(Release, TurkSource);
break;
case Status.PeerReviewCompleted:
IWorkFlowStep = new PeerReviewApprover(Release);
break;
case Status.PeerReviewRejected:
IWorkFlowStep = new CreateReviewHit(Release, TurkSource);
break;
case Status.IntialReviewByTrustedWorker:
IWorkFlowStep = new TrustedWorkerApprover(Release);
break;
case Status.Approved:
IWorkFlowStep = new ResultConsolidator(Release);
break;
case Status.Consolidated:
break;
case Status.Marked:
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment