public ActivityExecutionStatusEvent ExecuteNewEventForActivity(ActivityExecutionStatus newExecutionStatus, User currentUser, string comments, DateTime?contextDate, string contextCode) { //if (CurrentActivity.CurrentStatus.Description == newExecutionStatus.Description) { return null; }; var activityExecutionStatusEvent = CurrentActivity.ExecuteEvent(newExecutionStatus, currentUser, comments, contextDate, contextCode); switch (newExecutionStatus.Description) { case "CONFIRMED": CheckIfAbleToChangeFromConfirmationActivity(); MoveToNextActivity(WorkFlow, currentUser); break; case "CAUSALITYCONFIRMED": MoveToNextActivity(WorkFlow, currentUser); AddCausalityConfirmedDomainEvent(); break; case "E2BGENERATED": AddE2BGeneratedDomainEvent(); break; case "E2BSUBMITTED": AddE2BSubmittedDomainEvent(); break; default: break; } return(activityExecutionStatusEvent); }