SPFieldWorkflowStatus-Klasse

Stellt ein Workflow-Status dar.

Vererbungshierarchie

System.Object
  Microsoft.SharePoint.SPField
    Microsoft.SharePoint.SPFieldMultiChoice
      Microsoft.SharePoint.SPFieldChoice
        Microsoft.SharePoint.SPFieldWorkflowStatus

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

Syntax

'Declaration
Public Class SPFieldWorkflowStatus _
    Inherits SPFieldChoice
'Usage
Dim instance As SPFieldWorkflowStatus
public class SPFieldWorkflowStatus : SPFieldChoice

Hinweise

Diese Klasse stellt ein Feld vom Typ SPFieldType.WorkflowStatusdar.

Wenn Sie eine Workflowzuordnung zu einer Liste oder einem Inhaltstyp hinzufügen, wird der Feldauflistung ein Feld WorkflowStatus automatisch hinzugefügt. Sie können ein SPFieldWorkflowStatus -Objekt abzurufen, das Feld darstellt, indem Sie die GetField(String) -Methode aufrufen. Diese Methode erfordert eine Zeichenfolge als Argument an. Übergeben Sie den Wert der Name -Eigenschaft des SPWorkflowAssociation -Objekts, das die Liste oder einem Inhaltstyp hinzugefügt wurde. Das folgende Beispiel veranschaulicht diese Vorgehensweise.

Dim association As SPWorkflowAssociation = _
    SPWorkflowAssociation.CreateListAssociation(template, workflowName, taskList, historyList) 
list.WorkflowAssociations.Add(association)
Dim statusField As SPFieldWorkflowStatus = CType(list.Fields.GetField(association.Name), SPFieldWorkflowStatus)
SPWorkflowAssociation association = 
    SPWorkflowAssociation.CreateListAssociation(template, workflowName, taskList, historyList);
list.WorkflowAssociations.Add(association);
SPFieldWorkflowStatus statusField = list.Fields.GetField(association.Name) as SPFieldWorkflowStatus;

Threadsicherheit

Alle öffentlichen static (Shared in Visual Basic) Member dieses Typs sind threadsicher. Die Threadsicherheit von Instanzmembern ist nicht gewährleistet.

Siehe auch

Referenz

SPFieldWorkflowStatus-Member

Microsoft.SharePoint-Namespace

SPFieldType

Weitere Ressourcen

Field Element (Definition)