public void ReAssign( TaskBase task, User newExecutor, DateTime startDate, DateTime endDate, TaskPriority priority, Comment comment )
Reassign the task
Syntax
public void ReAssign( TaskBase task, User newExecutor, DateTime startDate, DateTime endDate, TaskPriority priority, Comment comment )
Parameters
- task
- Type: TaskBase
Task to reassign. Object. Access path: PublicAPI.Processes.WorkflowTaskBase
- newExecutor
- Type: User
New executor. Object. Access path: PublicAPI.Portal.Security.User
- startDate
- Type: System DateTime
Start date
- endDate
- Type: System DateTime
End date
- priority
- Type: TaskPriority
Task priority. Enumeration. Access path: PublicAPI.Enums.Tasks.TaskPriority
- comment
- Type: Comment
Comment. Object. Access path: PublicAPI.Portal.Objects.Common.Comment
Examples
//load the task by ID var task = PublicAPI.Processes.WorkflowTask.Load(3); //load the user by ID var newExecutor = PublicAPI.Portal.Security.User.Load(3); //get the "Regular" task priority var priority = PublicAPI.Enums.Tasks.TaskPriority.Meduim; //task start date var startDate = DateTime.Now; //task end date var endDate = DateTime.Now.AddDays(5); //create a comment var comment = InterfaceActivator.Create<IComment>(); //comment text comment.Text = "comment"; //comment author comment.CreationAuthor = AuthenticationService.GetCurrentUser<IUser>(); //comment creation date comment.CreationDate = DateTime.Now; //reassign the task PublicAPI.Processes.WorkflowTaskBase.ReAssign(task, newExecutor, startDate, endDate, priority, comment);
See Also