ITaskService.CreateTask Method

Creates a new workflow task.

Namespace:  Microsoft.SharePoint.Workflow
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No


<CorrelationInitializerAttribute> _
Function CreateTask ( _
    taskId As Guid, _
    properties As SPWorkflowTaskProperties, _
    specialPermissions As HybridDictionary _
) As Integer
Dim instance As ITaskService
Dim taskId As Guid
Dim properties As SPWorkflowTaskProperties
Dim specialPermissions As HybridDictionary
Dim returnValue As Integer

returnValue = instance.CreateTask(taskId, _
    properties, specialPermissions)
int CreateTask(
    Guid taskId,
    SPWorkflowTaskProperties properties,
    HybridDictionary specialPermissions


  • taskId
    Type: System.Guid

    The ID of the task to create.

Return Value

Type: System.Int32


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


ITaskService Interface

ITaskService Members

Microsoft.SharePoint.Workflow Namespace