ITaskService.CreateTask Method

Creates a new workflow task.

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

Syntax

'Declaration
<CorrelationInitializerAttribute> _
Function CreateTask ( _
    taskId As Guid, _
    properties As SPWorkflowTaskProperties, _
    specialPermissions As HybridDictionary _
) As Integer
'Usage
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)
[CorrelationInitializerAttribute]
int CreateTask(
    Guid taskId,
    SPWorkflowTaskProperties properties,
    HybridDictionary specialPermissions
)

Parameters

  • taskId
    Type: System.Guid

    The ID of the task to create.

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