public void Remove(UserTask userTask) { using (var session = sessionFactory.OpenSession()) { session.Delete(FindTask(userTask.TaskIdentifier, userTask.WorkflowInstanceIdentifier)); } }
public void Remove(UserTask userTask) { if (!tasks.ContainsKey(userTask.WorkflowInstanceIdentifier)) { return; } tasks[userTask.WorkflowInstanceIdentifier].Remove(userTask); }
public void Remove(UserTask userTask) { graphClient.Cypher.Match("(t:Task)") .Where("t.TaskIdentifier={name}") .AndWhere("t.WorkflowInstanceIdentifier={id}") .OptionalMatch("()-[r]->(t)") .WithParams(new { name = userTask.TaskIdentifier, id = userTask.WorkflowInstanceIdentifier }).Delete("t, r").ExecuteWithoutResults(); }
public void Add(UserTask userTask) { graphClient.Cypher.Match("(e:Execution {Identifier: {id}})") .Merge("(e)-[:HAS_TASK]->(t:Task)") .Set("t = {task}") .WithParams(new { id = userTask.ExecutionIdentifier, task = userTask }) .ExecuteWithoutResults(); }
public void Add(UserTask userTask) { IList<UserTask> userTasks; if (tasks.TryGetValue(userTask.WorkflowInstanceIdentifier, out userTasks)) { userTasks.Add(userTask); } else { userTasks = new List<UserTask>(); userTasks.Add(userTask); tasks.Add(userTask.WorkflowInstanceIdentifier, userTasks); } }
public void Add(UserTask userTask) { using (var session = sessionFactory.OpenSession()) { var entity = new UserTaskModel { TaskIdentifier = userTask.TaskIdentifier, ExecutionIdentifier = userTask.ExecutionIdentifier, WorkflowInstanceIdentifier = userTask.WorkflowInstanceIdentifier }; session.SaveOrUpdate(entity); session.Flush(); } }
public void Complete(UserTask task) { IExecution execution = persistenceProvider.LoadExecution(task.ExecutionIdentifier, serviceLocator.GetInstance<IExecutionPlan>()); if (execution == null) { throw new InvalidOperationException(string.Format("Execution with identifier '{0}' not found", task.ExecutionIdentifier)); } // TODO: txn TaskRepository.Remove(task); execution.Signal(); }