Extended custom state for SharePoint 2013 state Machine Workflows

Source: Internet
Author: User

When we use the state machine workflow for SharePoint 2013, we find a very unpleasant thing, that is, all of the workflow states in SharePoint are fixed, no way to show our custom status, and then after Google found that this state can be customized.

Custom Status Step

1, modify the XML add metadata the following extension;

<ExtendedStatusColumnValues>
 <StatusColumnValue>测试状态1</StatusColumnValue>
 <StatusColumnValue>测试状态2</StatusColumnValue>
 <StatusColumnValue>测试状态3</StatusColumnValue>
 <StatusColumnValue>测试状态4</StatusColumnValue>
 <StatusColumnValue>测试状态5</StatusColumnValue>
</ExtendedStatusColumnValues>

Screenshot below:

2, the enumeration type that declares the custom state in the workflow;

publicenumSPWorkflowStatus
{
   测试状态1 = 0,
   测试状态2 = 1,
   测试状态3 = 2,
   测试状态4 = 3,
   测试状态5 = 4,
   Max = 15
}

3. In the workflow process, add the SetState item in the SharePoint workflow, as shown in the following figure;

4, in the newly added SetState item, the modification correlation is workflowtoken (same as onworkflowactivated), does not have any task the token, like above;

5, create a new state field and associated with it, the following figure;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.