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