다음을 통해 공유


SPWorkflow.CreateHistoryDurationEvent Method

Writes a workflow history duration event to the specified workflow history list.

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

Syntax

'Declaration
Public Sub CreateHistoryDurationEvent ( _
    eventId As Integer, _
    groupId As Object, _
    user As SPMember, _
    duration As TimeSpan, _
    outcome As String, _
    description As String, _
    otherData As String _
)
'Usage
Dim instance As SPWorkflow
Dim eventId As Integer
Dim groupId As Object
Dim user As SPMember
Dim duration As TimeSpan
Dim outcome As String
Dim description As String
Dim otherData As String

instance.CreateHistoryDurationEvent(eventId, _
    groupId, user, duration, outcome, _
    description, otherData)
public void CreateHistoryDurationEvent(
    int eventId,
    Object groupId,
    SPMember user,
    TimeSpan duration,
    string outcome,
    string description,
    string otherData
)

Parameters

  • groupId
    Type: System.Object

    The group ID of the workflow history duration event belongs.

  • duration
    Type: System.TimeSpan

    The duration of the workflow history event.

  • outcome
    Type: System.String

    A description of the workflow event, limited to 255 characters.

  • description
    Type: System.String

    A longer description of the workflow event.

  • otherData
    Type: System.String

    Any other data to be captured about the workflow history duration event.

Exceptions

Exception Condition
SPException

HistoryList is null

-or-

HistoryList is not WorkflowHistory()

Remarks

The eventId parameter takes an enumerated type, based on the SPWorkflowHistoryEventType enumeration.

See Also

Reference

SPWorkflow Class

SPWorkflow Members

Microsoft.SharePoint.Workflow Namespace

Other Resources

Workflows in SharePoint Foundation

Workflow Development for SharePoint Foundation

Workflow Object Model Overview in SharePoint Foundation