Created
September 29, 2010 14:15
-
-
Save ToJans/602811 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class TaskWorkflow : AggregateRoot | |
| { | |
| private Dictionary<Guid,ManualTask> Tasks = new Dictionary<Guid,ManualTask>(); | |
| public void InitiateTaskWorkflow(Guid taskWorkflowId, Guid associatedChangeRequest, string createdBy); | |
| public void CreateTask(Guid taskIdentifier, string title,string description, DateTime plannedStartDate, DateTime | |
| plannedEndDate, string assignedUser, string assignedGroup, string | |
| createBy, WorkflowStage requiredCompletionStage); | |
| public void RejectTaskOwnerShip(long taskId, string rejectedBy) | |
| ; | |
| public void AssignTaskOwnership(long taskId, string assignedUser, string assignedGroup, string assignedBy); | |
| public void AcceptTaskOwnerShip(long taskId, string assignedUser,string acceptedBy); | |
| public void RescheduleTask(int taskId, DateTime startDate, DateTime endDate); | |
| public void CancelTask(int taskId, string cancelledBy, string cancellationReason); | |
| public void CompleteTask(int taskId, string completedBy); | |
| public void StartTask(int taskId, string userWorkingTask) | |
| { | |
| Publish(new TaskStarted() { ArId = base.ArId, TaskId = taskId, userWorkingTask = userWorkingTask }); | |
| } | |
| private void Handle(TaskWorkflowCreated e); | |
| private void Handle(TaskCreated e); | |
| private void Handle(TaskOwnershipAccepted e); | |
| private void Handle(TaskOwnershipRejected e); | |
| private void Handle(TaskOwnershipAssigned e); | |
| private void Handle(TaskRescheduled e); | |
| private void Handle(TaskCancelled e); | |
| private void Handle(TaskCompleted e); | |
| private void Handle(TaskStarted e) | |
| { | |
| Tasks[e.taskID].Status = Started; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment