Custom WF Status values

_SP2007

You can add customized SharePoint workflow status values for different stages in your workflow.

In the workflow.xml add the section like:

<ExtendedStatusColumnValues>

<StatusColumnValue>Approved</StatusColumnValue><!– ID:15–>

<StatusColumnValue>Rejected</StatusColumnValue><!– ID:16–>

</ExtendedStatusColumnValues>

Open the Workflow Designer page and drag a “SetState” (blue mark!) activity from the toolbox to the workflow. Right-click the activity and open its properties. Bind its “State” properties to a variable and select “field” while binding it. Select the correlation token as “WorkflowToken” as this activity does not belong to any task. Double click the activity to write some code.

Lets assume your “SetState” activity name is “PendingState”. When you double click on the SetState activity, write the following code:

PendingState.State = (Int32)SPWorkflowStatus.MAX; //ID:15

The integer value of MAX is 15. From 0 – 14, the numbers are reserved for  builtin values such as InProgess (2), Error Occured (3), Completed (5) etc. If you want to add more values you increase the value by 1. Therefore for the Reject value

PendingState.State = (Int32)SPWorkflowStatus.MAX+1; //ID:16

and so on.

Source: http://tipssharepoint.blogspot.com/2011/03/setting-workflow-status-to-custom.html

Is this Pages usefull? Usefull Useless 0 of 0 people say this Pages is usefull.