Question
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.
Number | Member name | Description |
---|---|---|
0 | NotStarted | The workflow has not started. |
1 | FailedOnStart | Indicates that the workflow encountered an error when it started. |
2 | InProgress | Workflow is currently in progress. |
3 | ErrorOccurred | An error occurred during the execution of the workflow. |
4 | StoppedByUser | Workflow execution was halted by a specified user. |
5 | Completed | The workflow is completed. |
6 | FailedOnStartRetrying | Indicates that the workflow is being retried after it failed to start. |
7 | ErrorOccurredRetrying | Indicates that the workflow is being retried after an initial failure. |
8 | ViewQueryOverflow | This member is reserved for internal use and is not intended to be used directly from your code. |
15 | Max | This 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
Number | Event Type | Description |
---|---|---|
0 | None | There is no specific event type for this workflow event. |
1 | WorkflowStarted | The workflow event concerns the workflow instance being initiated. |
2 | WorkflowCompleted | The workflow event concerns the workflow instance being completed. |
3 | WorkflowCancelled | The workflow event concerns the workflow instance being cancelled. |
4 | WorkflowDeleted | The workflow event concerns the workflow instance being deleted. |
5 | TaskCreated | The workflow event concerns a workflow task being created. |
6 | TaskCompleted | The workflow event concerns a workflow task being marked as complete. |
7 | TaskModified | The workflow event concerns a workflow task being modified. |
8 | TaskRolledBack | The workflow event concerns changes to a workflow task being rolled back. |
9 | TaskDeleted | The workflow event concerns a workflow task being deleted. |
10 | WorkflowError | The workflow event concerns the workflow instance generating an error. |
11 | WorkflowComment | The workflow event concerns a comment being written for the workflow instance. |
Related Links