Exemple #1
0
 /// <exclude />
 public void UpdateTasksWithFlowToken(FlowToken flowToken)
 {
     foreach (Task task in _tasks)
     {
         task.FlowToken = flowToken.Serialize();
     }
 }
Exemple #2
0
        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));
        }
Exemple #3
0
        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);
                }
            }
        }