[WF] Quickstart sample

Source: Internet
Author: User
[WF] Quickstart sample Preface

Workflow Foundation (WF) always gives a very useful impression, but does not know how to use it. This is mainly because there are too many pre-jobs and a lot of underlying knowledge need to be integrated to complete writing: Execute activity, pause activity, re-read activity, continue activity, this series of workflow.

The following example is a record of my learning about Workflow Foundation. The main record is how to: integrate the basic WF function to execute an activity. The activity is automatically stored in the database when it is idle. When you need to continue executing the activity, read the activity from the database by ID to continue execution. We hope that with such an example, developers can quickly jump beyond the portal of the Workflow Foundation.

  1. Download program code

    Click the following URL and extract the compressed file to obtain the relevant program code for this example:

    • Quickstartsample

    (We recommend that you first read the related categories of Workflow Foundation and then view the sample content.)

  2. Install Database

    In the example program, you need to use the SQL database to store the current execution status of the activity. Therefore, you need to add the corresponding data table to the SQL database. Follow these steps to create related data tables for workflow in the SQL database:

    • Create a blank Database: workflowinstancestore.

    • In the newly created database, run the SQL command sqlworkflowinstancestoreschema. SQL in the sample program code.

    • In the newly created database, execute the SQL command sqlworkflowinstancestorelogic. SQL in the sample program code.

  3. Execute Program code

    Use Visual Studio to enable and execute the sample project. You can see the following workflow: Execute activity, pause activity, re-read activity, and continue activity.

[WF] Quickstart sample

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.