public ApprovementTaskGroup SendToApprovement( IEnumerable<Document> documents, IEnumerable<User> users, DateTime executionDate )
Sends documents for approval to a list of users
Syntax
public ApprovementTaskGroup SendToApprovement( IEnumerable<Document> documents, IEnumerable<User> users, DateTime executionDate )
Parameters
- documents
- Type: System.Collections.Generic IEnumerable Document
list of documents, sent for approval. Object. Access path: PublicAPI.Docflow.Document
- users
- Type: System.Collections.Generic IEnumerable User
List of approvers. Object. Access path: PublicAPI.Portal.Security.User
- executionDate
- Type: System DateTime
Approval task end date (optional parameter)
Return Value
Type: ApprovementTaskGroupApproval task group
Examples
//create an empty list for documents var docList new List<IDocument>(); //load documents by IDs and add them to the list docList.Add(PublicAPI.Docflow.Document.Load(3)); docList.Add(PublicAPI.Docflow.Document.Load(4)); //create an empty list for users var userList = new List<IUser>(); //load users by IDs and add them to the list userList.Add(PublicAPI.Portal.Security.User.Load(3)); userList.Add(PublicAPI.Portal.Security.User.Load(4)); //set the approval task end date var executeDate = DateTime.Now.AddDays(4); //send for approval PublicAPI.Docflow.Tasks.SendToApprovement(docList, userList, executeDate); //WARNING!! If the approval task end date is not defined, then one day is added to the task creation date //The result is the approval task end date
See Also