asp.net Mvc2 OA workflow design idea [Figure]_ practical skill

Source: Internet
Author: User

Home to work new company, the first project: OA. has not done before OA, because design to workflow this piece of things, so I went to the relevant understanding, so have this blog (the following text is just personal understanding, master drift). Environment: mvc2+sql2008

The workflow is divided into several steps: form (design, parsing), process (design), merging is a complete workflow. Let's go to the previous diagram:

First step: Form

Because the graphical design form is not used, our idea is to enforce the format of the form, which is parsed in the background. As shown in figure:

The HTML above is mandatory, like TABLE>TBODY>TR>TD must be defined in this format, although not flexible, but the function is also realized. Talk about the idea: This form will be resolved into 11 nodes (applicant, date of application, Department, holiday category, Time of absence, deduction form, reason for absence, approver, date of approval, approval result, approval opinion)

As shown in the figure above, the parsing node is obtained by the ID in [hobby], and is parsed by Htmlagilitypack, specific code:

SelectNodes ("//table/tbody/tr/td[@id = ' title ']")  

This allows you to know all the nodes of the form, and the options for the headings correspond to the class, as can be seen from the above (to control whether the form nodes can fill out items, as described below).

Special control handling: for example, time is also defined by defining class= ' times ' and then dynamically binding the load through jquery.

Step Two: process, also through the text form to develop process steps

Define a process associated with a form

The handling permission here is directly associated with the user, to identify who owns the process of processing authority.

The next step is to define the process.

The diagram above is a complete procedure for the leave process, and the following describes how to make these steps.

Node ordinal: Used to indicate the current process as the first step, the node name is used to identify the current step name, whether to allow attachments, countersigned, to control the display and concealment of the attachment to the Check-in area. The next step identifies which steps the current step can flow to, the left side is already selected (can be a number of steps, here is considered, different positions using the same process will have special circumstances, such as the normal process is required four steps [staff to fill in "manager approval" director of the examination and approval "personnel record], But when the director takes a leave of absence so many steps [fill out a form], the right side is pulling all the steps under the current process. Non-write segment identification, the current step, the form of which nodes can not be filled out, such as: Employees fill out the application form, transfer to the manager, then the manager saw the form of staff names, departments and other information can not be filled out, can only fill in the examination and approval opinions and other node information So the process is related to the form, and then the workflow flows.

The Third step: Workflow flow, simulation process flow, new process

Define the name of the workflow

Click to confirm that the new is, jump directly to the process page, and in the database into the first step of the process information.

Then fill out the form content, select the next step and the operator can flow to the next step. Description: Form content I put the entire form's HTML code into the database, and then the flow of the completed form of the content into the next step, so the process to the next step, see the form is the latest. This is a very stupid way, because the use of $ ("#表单tableID") is not to get the value of the form, all need to process, get the form content through jquery directly attr (value, text value) up, so that the contents of the form to the database.

There are also many cases involved, when the manager chooses to be multiple people, unless the last person, otherwise the flow is not allowed to move to the next, but you can fill out the comments and modify the form, the modified form will overwrite the current step form, to the last transfer to the next, so repeat the flow of the process can be achieved.

Language organization can not be strong, all can only say in this way, the whole process is still flawed, form design and process design can only use the form of text, may later consider the replacement of graphics, there is not support sub-process. It's written so much today, and it's only recently that you've been in touch with custom workflows, and you've seen a lot of very powerful workflows, so you'll continue to do, improve, and learn later.

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.