/// <exclude /> public void UpdateTasksWithFlowToken(FlowToken flowToken) { foreach (Task task in _tasks) { task.FlowToken = flowToken.Serialize(); } }
public TaskContainer RuntTasks(FlowToken flowToken, TaskManagerEvent taskManagerEvent) { string serializedFlowToken = flowToken.Serialize(); List <Task> tasks; lock (_lock) { tasks = _tasks.Where(f => f.FlowToken == serializedFlowToken).ToList(); } return(new TaskContainer(tasks, taskManagerEvent)); }
public void CompleteTasks(FlowToken flowToken) { string serializedFlowToken = flowToken.Serialize(); lock (_lock) { List <Task> tasks = _tasks.Where(f => f.FlowToken == serializedFlowToken).ToList(); foreach (Task task in tasks) { task.TaskManager.OnCompleted(task.Id, null); _tasks.Remove(task); DataFacade.Delete <ITaskItem>(f => f.TaskId == task.Id); } } }