Home
Manage Your Code
Snippet: SharePoint workflow.xml with extended status values (XML)
Title: SharePoint workflow.xml with extended status values Language: XML
Description: Example of a SharePoint workflow XML definition file with custom status values. Views: 1161
Author: Matt Morse Date Added: 12/23/2007
Copy Code  
<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Workflow
       Name="Test Workflow"
       Description="Workflow process test."
       Id="4A7E0789-D1C9-4c85-ADD9-1FE50B1E67A3"
       CodeBesideClass="Test.TestWorkflow"
       CodeBesideAssembly="Test.TestWorkflow, Version=1.0.0.0, Culture=neutral, PublicKeyToken=32f7f97ab571f0ac"
       TaskListContentTypeId="0x01080100C9C9515DE4E24001905074F980F93160" 
       ModificationUrl="_layouts/ModWrkflIP.aspx"
       AssociationUrl="_layouts/CstWrkflIP.aspx"
       >

    <Categories/>
    <MetaData>
      <Association_FormURN>urn:schemas-microsoft-com:office:infopath:AssocForm:-myXSD-2006-12-26T21-51-13</Association_FormURN>
      
      <Task0_FormURN>urn:schemas-microsoft-com:office:infopath:DraftForm1:-myXSD-2006-12-12T17-41-23</Task0_FormURN>
      <Task1_FormURN>urn:schemas-microsoft-com:office:infopath:DraftForm2:-myXSD-2006-12-13T14-29-26</Task1_FormURN>


      <StatusPageUrl>_layouts/WrkStat.aspx</StatusPageUrl>

      <ExtendedStatusColumnValues>
        <StatusColumnValue>1. Shell</StatusColumnValue> 
        <StatusColumnValue>2. Draft</StatusColumnValue>
        <StatusColumnValue>3. In Review</StatusColumnValue>
        <StatusColumnValue>4. Submitted</StatusColumnValue>
        <StatusColumnValue>5. Final</StatusColumnValue>
      </ExtendedStatusColumnValues>
    </MetaData>
  </Workflow>
</Elements>
Usage
public const int STATUS_SHELL = 15;
public const int STATUS_DRAFT = 16;
public const int STATUS_INREVIEW = 17;
public const int STATUS_SUBMITTED = 18;
public const int STATUS_FINAL = 19;
Notes
Note that the values that are specified in the workflow.xml for the status are referenceable within the code. Status values for 0-14 are reserved by SharePoint, so custom status values start at 15.