ITaskService.CreateTaskWithContentType Method
Creates a new workflow task of the specified content type.
Namespace: Microsoft.SharePoint.Workflow
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
<CorrelationInitializerAttribute> _
Function CreateTaskWithContentType ( _
taskId As Guid, _
properties As SPWorkflowTaskProperties, _
taskContentTypeId As String, _
specialPermissions As HybridDictionary _
) As Integer
'Usage
Dim instance As ITaskService
Dim taskId As Guid
Dim properties As SPWorkflowTaskProperties
Dim taskContentTypeId As String
Dim specialPermissions As HybridDictionary
Dim returnValue As Integer
returnValue = instance.CreateTaskWithContentType(taskId, _
properties, taskContentTypeId, specialPermissions)
[CorrelationInitializerAttribute]
int CreateTaskWithContentType(
Guid taskId,
SPWorkflowTaskProperties properties,
string taskContentTypeId,
HybridDictionary specialPermissions
)
Parameters
taskId
Type: System.GuidThe ID of the task to create.
properties
Type: Microsoft.SharePoint.Workflow.SPWorkflowTaskPropertiesThe properties of the workflow task.
taskContentTypeId
Type: System.StringThe ID of the content type to assign to the workflow task.
specialPermissions
Type: System.Collections.Specialized.HybridDictionaryAny special permissions for the task created.
Return Value
Type: System.Int32
Remarks
Specifying per-item access control list (ACL) rights is resource intensive and may negatively impact workflow performance.
When this method is called, the ITaskService class raises an OnTaskCreated event.