WF-Basic Introduction

Source: Internet
Author: User

1. Overview
Windows Workflow Foundation (WF) is designed for Microsoft products and related applications.ProgramProvides design platforms and development tools. A workflow represents a different programming model-a model that clearly separates work content from work time. A workflow usually uses a declarative rather than procedural programming model.

A workflow is composed of activities. All activities and workflows are derived from the system. workflow. componentmodel. Activity Class. WF provides a core Runtime Engine workflowruntime class. The workflow is not an independent program. The host application must carry instances of this class. When an application carries a workflow, it carries a separate workflow instance. External Service concepts are supported when a workflow is running. A service is an instance of a class created and registered to the runtime when the application is started. Each service achieves a predetermined purpose. There are two types of services: core services and local services. The functions provided by core services are defined by Microsoft, and local services are defined by users. A workflow uses a local service to communicate with other modules of the application.

Task implementation provided by WF:

    • Defaultworkflowschedulerservice (Scheduler Service) creates and manages its own threads used to execute workflows.
    • Manualworkflowschedulerservice (Scheduler Service) allows workflow instances to run using the thread provided by the Host application.
    • Defaultworkflowcommitworkbatchservice (commit work Batch Service) is implemented by default.
    • Sharedconnectionworkflowcommitworkbatchservice (commit work Batch Service) this implementation is used to manage cross-Object Relational Connection database transactions
    • Sqlworkflowpersistenceservice (persistent Service) uses the persistent service of the SQL Server database
    • Sqltrackingservice uses the SQL Server database tracking service

WF program development tasks include:

    • Activity Development (each functional point of the requirement is an "activity", which achieves loose coupling by splitting the functions .)
    • Workflow development (Business Process Development .)
    • Host Development (available hosts include Windows console applications, Windows Services, Windows Forms, WPF applications, ASP. NET applications, and any hosts of the WCF Service .)

2. Create a WF Program

    • Activity Development
      An activity is an independent and reusable component designed to achieve a predefined purpose.In a workflow, an activity represents a step, which is a basic construction block of the WF workflow.
      Activities are divided into simple activities (not capable of carrying other activities) and compound activities (other activities can be carried ). WF contains a set of standard activities that can be used in a workflow.
    • Workflow development
      WF supports two workflow types: sequential workflow (derived from the sequentialworkflowactivity class) and state machine workflow (derived from the statemachineworkflowactivity class ). If you are familiar with modeling, you will be very kind to the process designer. Sequential workflows draw flowcharts, while state machine workflows draw state diagrams.
    • Host Development
      The Host application is responsible for creating the workflowruntime engine ). After the instance of the workflowruntime class is initialized, the host uses it to create and start a separate workflow instance (workflowinstance ). The host can also subscribe to workflowruntime events to monitor the execution of each workflow instance.

 

Source: http://www.cnblogs.com/MeteorSeed/archive/2012/08/22/2645759.html

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.