Share via


ITaskService.CreateTaskWithContentType method

Creates a new workflow task of the specified content type.

Namespace:  Microsoft.SharePoint.Workflow
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

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.Guid

    The ID of the task to create.

  • taskContentTypeId
    Type: System.String

    The ID of the content type to assign to the workflow task.

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.

See also

Reference

ITaskService interface

ITaskService members

Microsoft.SharePoint.Workflow namespace