Пример #1
0
        private Response Schedule(ProposedTaskInstance task)
        {
            var record = TaskInstanceRecord.From(task);

            _store.Put(task.Id, record);
            _messages.Publish(new TaskInstanceScheduled {
                Record = record
            });
            return(Response.Success());
        }
Пример #2
0
        private Response UpdateTask(TaskInstanceRecord task, ChangeTaskStatus req)
        {
            var changeMsg = new TaskInstanceStatusChanged {
                Id = task.Id, PreviousStatus = task.Status, CurrentStatus = req.NewStatus
            };

            task.Status = req.NewStatus;
            task.UpdatedStatusByUserId = req.ApproverUserId;
            task.UpdatedStatusAt       = req.At;
            _store.Put(req.Id, task);

            _messages.Publish(changeMsg);

            return(Response.Success());
        }
Пример #3
0
 public void Put(string id, TaskInstanceRecord obj)
 {
     _store.Put(id, obj);
 }