Ejemplo n.º 1
0
        public void CreateWorkItem(WorkItem wi)
        {
            using (SoodaTransaction st = StartTransaction())
            {
                Task tsk = new Task(st);
                if (wi.AssigneeGroupId != null) tsk.AssigneeGroup = Group.GetRef(st, Convert.ToInt32(wi.AssigneeGroupId));
                if (wi.AssigneeId != null) tsk.Assignee = User.GetRef(st, Convert.ToInt32(wi.AssigneeId));
                tsk.CorrelationId = wi.CorrelationId;
                tsk.ProcessInstance = wi.ProcessInstanceId;
                tsk.Title = wi.Title;
                tsk.Description = wi.Description;
                tsk.TaskId = wi.TaskId;
                tsk.Status = TaskStatus.AssignedGroup;
                if (!wi.IsGroupResponsible)
                    tsk.Status = TaskStatus.Assigned;
                tsk.CreatedDate = DateTime.Now;
                if (wi.AssigneeGroupId != null) tsk.AssigneeGroup = (Group) st.GetObject(typeof(Group), wi.AssigneeGroupId);
                if (wi.AssigneeId != null) tsk.Assignee = (User)st.GetObject(typeof(User), wi.AssigneeId);

                st.Commit();
            }
        }
Ejemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     log.Info("Page_Load");
     int id = Int32.Parse(Request["id"]);
     _theTask = WK.Task.GetRef(id);
 }