public WFTempClosureLegalReview(TempClosureLegalReview entity) : base(entity) { var legal = ProjectUsers.FirstOrDefault(pu => pu.ProjectId == entity.ProjectId && pu.RoleCode == ProjectUserRoleCode.Legal); var task = TaskWork.GetTaskWork(entity.ProjectId, ClientCookie.UserCode, TaskWorkStatus.UnFinish, FlowCode.TempClosure, FlowCode.TempClosure_LegalReview); K2Param.Task = task; K2Param.AddDataField("dest_Creator", Entity.CreateUserAccount); K2Param.AddDataField("dest_Legal", legal.UserAccount); K2Param.AddDataField("ProcessCode", ProcessCode); K2Param.AddDataField("ProjectTaskInfo", JsonConvert.SerializeObject(task)); }