Windows Workflow Foundation Study Notes (1)
I recently read some articles and found that there are more and more people studying and studying the Windows Workflow Foundation. The company assigned me to study the wwf, and there is nothing to write about the newly created blog, I will share my WWF notes with you. You can learn from each other and enrich my blog.
As one of the pillars of WinFX APIs, WWF provides developers with a general framework-a process-driven and workflow-centric workflow program developed on it.
1. What is a workflow and what is its purpose?
A workflow is essentially a method used to archive activities contained in the work of completing a unit. Typically, a job \ "stream \" flows through one or more activities during processing. These activities can be implemented by machines or manually, and may be as simple as defining page order in an Internet application, it may also be as complex as a document or product that must be viewed, changed, and approved by any number of users.
2. What is WWF? What is its overall framework?
WWF is actually a program, but it is a program that specifically controls workflows. It provides a framework, model, and workflow engine (WorkflowRuntime) for developing workflows ), allows developers to quickly create workflows.
1. Activities (activity)
A workflow consists of several activities. Each activity contains a specific function to complete a task.
2. Serivices)
When a workflow instance is running, many Serivices can be run along with them. These Services are all called in a pluggable manner, that is, these Serivices are used to meet the needs of running instances of different workflows, it runs along with the instance. For example, in a workflow running instance, we can load the Service that communicates with the Host Program at the same time, and listen to and track the Service that runs the workflow instance.
3. The communication and relationship between WWF and the Host Program.
The host program can communicate and exchange data with the workflow through the communication Service. At the same time, the host program can also define some interfaces with some special Activiy activities in WWF, communication and data exchange are performed in the form of event passing parameters.
4. WWF persistence ("passive ")
The WWF workflow program can run for a long time, and the instances can still run properly and accurately after the computer where the WWF is running restarts, it is implemented by the "passivation" mechanism of WWF. WWF contains a very useful Service to save the running data to SQlServer.
5. WWF tracking
In WWF, You can monitor workflow operations while the workflow is running, and these operations can be recorded in the database or file.
6. WWF serialization
The WWF activity can be serialized, And the custom style of the custom Activity can be saved through serialization.
7. WWF Dynamic Update
The WWF workflow allows the workflow to dynamically update the working state, or dynamically control the flow of the workflow to change the expected flow.