Skip to main content
Search Again

We think these articles could help you:

    See More
    Nintex Knowledge Base

    What Are The Status IDs For Each Workflow Status?

    Status: Validated

    QUESTION
    When filtering a SharePoint list view on the workflow status, what are the IDs that need to be filtered on?
    ANSWER

    Here are the workflow status codes which are required, for example, you want to filter a view on the workflow status. The status enumeration is defined by the SPWorkFlowStatus enum, within the Microsoft.SharePoint.Workflow namespace in the Microsoft.SharePoint assembly.

    If you are retrieving the list values in a SQL Reports using the SharePoint provided web service you will get these status codes only and not the text values. This includes exporting a list to Excel.

      

    NumberMember nameDescription
    0NotStartedThe workflow has not started.
    1FailedOnStartIndicates that the workflow encountered an error when it started.
    2InProgressWorkflow is currently in progress.
    3ErrorOccurredAn error occurred during the execution of the workflow.
    4StoppedByUserWorkflow execution was halted by a specified user.
    5CompletedThe workflow is completed.
    6FailedOnStartRetryingIndicates that the workflow is being retried after it failed to start.
    7ErrorOccurredRetryingIndicates that the workflow is being retried after an initial failure.
    8ViewQueryOverflowThis member is reserved for internal use and is not intended to be used directly from your code.
    15MaxThis member is reserved for internal use and is not intended to be used directly from your code.

     

    In addition, if you are using the OOTB Approval workflow then the return codes for this, as defined in the ReviewRoutingState enumeration within the Microsoft.Office.Workflow namespace (Microsoft.Office.Workflow.Routing assembly), are:

     

    Canceled = 15

    Approved = 0x10 (16)

    Rejected = 0x11 (17)

     

    Credit: Chanakya Jayabalan

    Source: https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.workflow.spworkflowstatus.aspx

     

    Workflow History List Event Types

     

    NumberEvent TypeDescription
    0NoneThere is no specific event type for this workflow event.
    1WorkflowStartedThe workflow event concerns the workflow instance being initiated.
    2WorkflowCompletedThe workflow event concerns the workflow instance being completed.
    3WorkflowCancelledThe workflow event concerns the workflow instance being cancelled.
    4WorkflowDeletedThe workflow event concerns the workflow instance being deleted.
    5TaskCreatedThe workflow event concerns a workflow task being created.
    6TaskCompletedThe workflow event concerns a workflow task being marked as complete.
    7TaskModifiedThe workflow event concerns a workflow task being modified.
    8TaskRolledBackThe workflow event concerns changes to a workflow task being rolled back.
    9TaskDeletedThe workflow event concerns a workflow task being deleted.
    10WorkflowErrorThe workflow event concerns the workflow instance generating an error.
    11WorkflowCommentThe workflow event concerns a comment being written for the workflow instance.

    Source: https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.workflow.spworkflowhistoryeventtype.aspx

    ADDITIONAL INFORMATION
    • Was this article helpful?