Recently the company to re-launch a new set of CRM system, to restructure the old system of business Flow module, team discussion has Microsoft's workflow as the technical basis. I have not been involved in the relevant knowledge, the current project has not begun, the early stage to learn and understand the system under the WF for later development lay some technical foundation. This article is to open the title film, do some simple introduction and introduction.
From WinFX to net3.x to NET4.0, WPF,WCF,WF is always put together, WPF (Silverlight) For program UI presentation, WCF for program communication, WF for program logic control, This idea is very clear from Microsoft's proposed WinFX to the present net3.x to NET4.0. WPF (Silverlight) and WCF are now well-known and widely used. But there are not many people who care about WF.
Summary
Workflow is a recently popular technology, in fact WF originated in the the mid 1970s office automation field, since August 1993, WFMC (Workflow Management Alliance) was established, 1994 developed a series of workflow standards. Into the 21st century workflow is more and more scholars concerned, the technology is becoming more mature. Of course, I also have to keep up with the pace of the times, so also join the work flow of the army, hoping to keep up with the footsteps of predecessors.
The full name of WF is the Windows Workflow Foundation,
The first contact with WF was in 2004, when Microsoft introduced a CTP version of the development package, WinFX.
There are three things in WinFX: Avalon, Indigo, Winoe I have all these three things involved.
Like many Microsoft technologies, WinFX has no follow-up after Bata2. Fortunately, my year-long technical investment was not wasted, WinFX in 2006 in the form of Net 3.0 officially released (in fact, even if WinFX no below, I do not have any regrets, In the days of learning WinFX, I understood a lot of new design ideas.
In Net 3.0,
Avalon became the Windows Presentation Foundation abbreviation for WPF
Indigo became the Windows communication Foundation abbreviation for WCF
Winoe became the Windows Workflow Foundation abbreviation for the WWF
Later, Microsoft launched the wfp/e based on WPF, and WFP/E was the predecessor of Silverlight.
WPF,WCF,WWF from the beginning is tied together, why the WWF is now called WF, less a "W", that is because the WWF and another abbreviation of the name of the world Wild Fund for Nature "WWF"
So what is WF, and I'm not going to go into specifics here, but WF is definitely not a traditional "workflow" dimension.
From WinFX to net3.x to NET4.0, WPF,WCF,WF is always put together,
WPF (Silverlight) is used for program UI presentation, WCF is used for program communication, and WF is used for program logic control, which is very clear from Microsoft's proposed WinFX to the present net3.x to NET4.0.
WPF (Silverlight) and WCF are now well-known and widely used. But there are not many people who are concerned with WF.
Outline
I. Introduction of Workflow
Second, the reference model of workflow
Third, workflow management system
Iv. Workflow Management System Architecture
V. Current status of the workflow
Vi. First Workflow instance
Introduction to Workflow
The English word of the workflow is workflow, which is a combination of English word work and English word flow, as is the term in most computer fields. Work translation for tasks, jobs, etc., flow is translated into flow, flow and so on. Flow reflects the dynamic nature of a thing or the process of change, such as the flow of water is called a flow, the flow of air is called air flow, as well as material flow, capital flow, etc., in the abstract field of information flow, control flow, etc., therefore, the use of the change between tasks, activities and activities to represent the business process is called workflow
Workflows do not yet have a unified, unambiguous definition, and different organizations and researchers define the workflow as a separate definition:
- Definition 1: A workflow is a class of business processes that can be fully or partially automated, and that documents, information, or tasks can be passed and executed between different performers based on a set of process rules.
- Definition 2: A workflow is the organization of a set of tasks to complete a business process. The trigger order and trigger conditions for tasks are defined in the workflow. Each task can be done by one or more software systems, or by one or a group of people, or by one or more individuals working in collaboration with the software system. The trigger order and trigger conditions of the task are used to define and implement the trigger of the task, the synchronization of tasks, and the transmission of the information flow (data stream).
- Definition 3: A workflow is a mechanism for implementing the practice of a business process.
- Definition 4: A workflow is a computerized representation model of the business process that defines the various parameters required to complete the process. These parameters include the definition of each step in the process, the order of execution between steps, the conditions and the establishment of the data flow, who is responsible for each step, and the applications that are required for each activity.
The definition of these workflows, though different in presentation, basically illustrates the problem that workflow is a computer implementation of the business process. The use of workflow as the implementation of business processes first requires that the workflow system can reflect the following aspects of the business process:
- 1. What is the business process, which consists of activities, tasks, or structural definitions;
- 2. What to do, namely the execution conditions, rules and the information of the interaction between activities, i.e. the definition of control flow and flow;
- 3. Who will do this, that is, human or computer applications, that is, the definition of organizational role;
- 4. How to do it, that is, through the workflow management system to monitor the implementation process.
Workflow Reference Model
One of the main contributions of WFMC in the relevant specifications and standards of workflow is the proposed workflow Reference Model (Workflow Reference models). The workflow reference model is derived from the analysis of the normal workflow program structure and the interface in the structure, which can make different products work together at different structure level. All workflow systems contain a series of common components, which are coordinated by a defined set of methods, and different products exhibit different processing power in these common components. In order to achieve collaborative work among different workflow products, a standard set of interfaces and data interchange formats is required between these components. By implementing these standard interfaces, the collaborative work between products can be achieved.
Let's take a look at the reference model of WFMC:
Let's go through each of the following to explain the specific role of each interface:
1. Interface 1:
The interface between modeling or defining tools and runtime workflow management software.
2. Interface 2:
The interface that provides the communication API between the client application and the workflow engine.
3. Interface 3:
This interface is an API for communication between the workflow engine and other applications.
4. Interface 4:
The communication API between workflow and workflow is the core API to implement distributed workflow management system.
5. Interface 5:
The tool provides an interface for monitoring and managing the current state of the workflow engine and the instances running under the engine.
Let's take a look at the relevant tools above:
process definition Tools:
is to provide a process definition that is convenient to use and can be recognized by the computer, and currently we use a more extensive process definition of WF through graphical tools. Finally output a XPDL file. XPDL (XML process definition Language) is a standardized specification presented by Workflow Management Coalition, which enables different workflow software to exchange business process definitions using XML files.
Management monitoring tools:
Monitor workflow across the organization and provide a range of management functions for security, Process control, authorization, and more. Typical functional scope includes user management, role management, monitoring management, resource management, process monitoring and management. such as: instantiation of the process model, start, suspend, resume, terminate the process instance, manage the executing process instance, etc.
Workflow Execution Services:
Consists of one or more workflow engines, which provides the execution of the process instance, navigates the activity, interacts with the external resources to complete the activities, and maintains the functions of control data and related data.
is the entire flow of workflow services:
Workflow Management System
Workflow Management Systems--workflow Management System (WFMS), based on the workflow definition, has the following definitions.
definition 1: A workflow management system is a software system that completes the definition and management of workflows and advances the execution of workflow instances in accordance with the predefined workflow logic in the computer.
definition 2: A workflow management system is a computer software system that supports the efficient execution and monitoring of the execution process of a business process.
According to the definition of workflow management system, a workflow management system should provide the following functions:
1. Define, implement and manage the operation of the workflow;
2. Interact with workflow performers, i.e., people or application systems;
3. Promote the implementation of workflow instances;
4. Monitor the running state of the workflow.
It should be noted that the workflow management system is not the business system of the enterprise. To a large extent, the workflow management system provides a software support environment for the operation of the enterprise's business system, very similar to the operating system on a single computer. But the scope of the workflow management system support is relatively large, the environment is more complex, so there is a person workflow management system is a business operating system.
Workflow Management System Architecture
WFMC proposes a workflow management system product architecture. This architecture gives the functional components and interfaces of the abstract workflow management system, which can meet the main functions of workflow management system and products, and can provide a common basis for interoperability between workflow products. As can be seen, the workflow management system consists of three parts:
It is also the architecture design diagram of Workflow management system proposed by WFMC. Let's explain how the next few important components work:
Software Component : Complete the implementation of different components of workflow management system, including process modeling tools, workflow engine, Task Table Manager and user interface;
System Control Data : Data used by one or more software components in a workflow management system, including process definitions, organization/role model data, workflow control data, workflow-related data, task tables;
application and Application Data : For the workflow management system, they are not part of the workflow management system, but belong to the external system and data, they are called by the workflow management system to complete or part of the workflow management functions, such as external applications that are called by the workflow management system and data for these application operations.
Current status of workflow
Let's take a look at the many automated office processes:
Through the above picture, may not see very clearly, I also did not draw a clear, so we first make a look, and then I fill up, above can see the different roles of people, responsible for in the workflow state and behavior is different. The above highlights the issue of the distribution of job responsibilities.
The concept of workflow originates from the field of production organization and office automation, and the aim is to achieve the goal of improving work efficiency, reducing production cost, improving the level of production and management and enterprise competitiveness by breaking down the job into well-defined tasks and roles and carrying out these tasks according to certain rules and processes.
Many enterprise application system according to the function from the large scope to divide, nothing but two, one is the official document circulation, the daily Office as the main office automation system, the other is the business process of business processes as the main auxiliary object of the specific business system. Whether it is an office automation system or a specific business system, is to provide software services for enterprises, are in line with the purpose of serving the needs of enterprises, however, the real world of the business process is constantly changing and adjustment in order to adapt to the rapidly changing market. The biggest problem that this kind of change brings to the information system software is that the adjustment of the enterprise management process often makes the original information system software to overturn the redesign and development, so that the development cost is very high, To find a relatively flexible structure and management mode so that the information system can quickly adapt to the changes in the business process has become the enterprise structure of information systems software designers of the first-class topic. The reason why workflow and workflow management system can be used for enterprise information system is also this. While workflow technology has begun to have a sky in enterprise applications, workflow technology is still at the beginning of its technological development compared to other technologies already used in the enterprise.
Shows a comparison of the development curve between the workflow and the RDBMS system:
Of course, we see WF in the proposed and initial stages of development, and database management system is very mature and product.
My WorkFlow Trip
Below we began to enter the development of WF, as if the length of the nonsense is more, I hope you do not like to see hehe, we will start to develop it to complete our WF development journey of the first program demo.
1. Create a new state machine workflow or sequential Workflow Console application:
2. After entering the project name:
3, design the relevant state node in workflow. The main design page is as follows:
4. Create a new state node, locate the following node in the toolbar on the left, and drag it to the designer:
Select the state node and drag it to the designer, which appears as follows:
5, the initial state node in the design state process and the completion state node, after all, the state of the workflow must have a beginning and end, for the state machine is necessary.
6, when we add the state, we now set the status of the jump and distance. Drag a new node into the designer:
When the node is selected, the Properties Edit dialog box opens.
7, set the status of the node jump and other behavior, etc.:
8, according to the order in, to the first initialization start state also add the same event, to complete the jump. The code behind the scenes is as follows:
9. After operation, the effect is as follows:
WF4.0 Basic article (i) Start using wf--