public List <TaskVariable> CompleteTask(int id, List <TaskVariable> taskVariables) { var workflowTask = new WorkflowTask(); workflowTask.Id = id; workflowTask.Variables = taskVariables.Select(x => new WorkflowTaskVariable() { Name = x.Name, Type = x.Type, Value = x.Value }).ToList(); _workflowService.CompleteTask(workflowTask); return(taskVariables); }