SharePoint Sequential Workflow Creation

Source: Internet
Author: User

Sequential workflows provide a series of organized steps, and in general, the steps are performed one by one.

1. New > Project, select SharePoint Solution > Empty project:

2. Deploy as a farm solution

3. Add > New Item, select Office/sharepoint > Sequential Workflow (Farm solution only), next set up related list

4. Create CreateTask, onTaskChanged, Completetask, respectively

5. Select CreateTask1, add correlation token and Owneractivityname:

6, three selected individually, red bound to new Members > select Create field; Green drop-down Select the Task1token set for the previous step; purple binds to an existing member, as follows:

7, double-click, the new code is as follows:

1         Private voidCreatetask1_methodinvoking (Objectsender, EventArgs e)2         {3             //Build task ID4CREATETASK1_TASKID1 =Guid.NewGuid ();5             //Task Title6Createtask1_taskproperties1.title ="Manager Approval";7             //Set task operator8Createtask1_taskproperties1.assignedto =@"I:0#.w|canomo\name";9             //Set task completion levelTenCreatetask1_taskproperties1.percentcomplete =0; One             //Set task start date ACreatetask1_taskproperties1.startdate =Datetime.today; -             //set the task expiration date to 7 days from the start of the workflow task -Createtask1_taskproperties1.duedate = DateTime.Now.AddDays (7.0); the         } -  -         Private voidOntaskchanged1_invoked (Objectsender, ExternalDataEventArgs e) -         { +Ontaskchanged1_afterproperties1.percentcomplete =1.0f; -             //Receive approval Data +         } A  at         Private voidCompletetask1_methodinvoking (Objectsender, EventArgs e) -         { -             //Approval Complete -}

8. OK, deploy test:

SharePoint Sequential Workflow Creation

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.