I've been working on a workflow recently, just searching the web for an example of a asp.net workflow (wwf+linq) that I've been working with in Moss before, but that's a workflow for Moss, I've been working on B/S architecture, knowing that workflows can be used in many environments, including asp.net, which makes me very interested in doing an example like this. Read the source code, most of them feel very good, but also some people think not very satisfied with the place, this may be because the author considered just a simple demo, there is no need to pay attention to some of the technical details of the problem.
Project Description: A reimbursement level two approval workflow, the data-tier operation using LINQ to SQL, although Ms no longer show it.
Level One: Employees submit reimbursement form to PM (manager), if the number is greater than 1000RMB, if the manager chooses to approve, the workflow will go to the VP's level two approval, and the manager can choose to reject directly.
Second level: PV (VP), deputy General received the approval of the PM, you can choose to pass or is rejected, if passed, workflow will be submitted to the financial. End the workflow by financial end.
The flowchart is as follows:
The workflow I created has the following differences from the source code of the original author:
1: The workflow of the original text uses the state machine workflow, and here I take the sequential workflow.
2: Separate the data operation and business logic as well as the function of the page layer completely. That is, as long as the data access, operation-related code only allowed to appear in the data processing layer, and the business logic layer and the page layer are not allowed, the page layer and the business logic layer only communication, do not allow direct access to the data processing layer.
3: The name of the project has changed, for example:
Solution Name: Approveworkflow, the page layer is called Approveworkflow.web.
4: Appropriate improvements have been made to the relevant methods.
5: Add methods and documentation comments.
The project structure chart is as follows: