Implementation of process-based preparation matters

xiaoxiao2021-03-06  80

Implementation of process-based preparation matters

Noun definition

Process: workflow, the end of a job Decides the beginning of another work

Steps: Every step in the process, each job

Flow main body: in step, work object

For example: Employees create a request to submit to the manager, and the manager is reached later to the employee. This process is a process. It includes: creating an application, submitting, instructions, four steps, and the flow body is an application.

Problem Description

The pending thing here is that matters that record each operator need to do in a process.

Therefore, it is based on the process. When the procedure goes to a step, the person to operate automatically in the work of this step is to automatically add a job. When coming to the next step, the item is automatically canceled.

The complexity of the problem to be processed mainly depends on the complexity of the process.

Factors affecting the complexity of the process:

1. Is there a concurrent process.

2. Whether the flowing body changes.

In our current process, there is a concurrent process; there are 4 flowers, projects, design orders, budget supplemental application orders.

solution

Set a flag (POINT) for each step. Create a logo list TBL_PENDING_NOTICE

Add three properties to the flow body: the current user (CUR_UID), current flag (CUR_POINT), flow time (pass_date).

Set format:

Sign ([process number] / [step number]), such as starting steps (0/1) -> (0/2) have a concurrent process (1/1), (2/1) .

Current User (CUR_UID): ([User Number]), the user number can be numbers of a single user such as: (34), or a combination of multiple user numbers such as ((12), (34), (56) Three concurrent processes, each process current steps are 12, 34, 56, respectively.

Current Sign (CUR_POINT): (([Users Number]) @ ([Symbol])). Such as single processes ((34) @ (0/4)), three concurrency flow ((12) @ (1/1), (34) @ (2/1), (56) @ (3/1)).

Mobile time (pass_date): Time data.

Operation method

Reading

Setting: Read the user number 34 (hereinafter referred to as user 34) to work on the project

1. In the project table, find if there is (34) in the CUR_UID, and it means that the user 34 has something to do in the project;

2, check if there is (34) @, if not, the data structure is damaged

3, in Cur_Point, intercept from (34) @, one start to the end of the end;

4. In the intercepted string, intercept the string from the beginning to the first ")", the step logo

This allows the user 34 in the project table, the current premises.

SQL:

Declare @myid varchar (50) SET @myid = '(34)' select my_point, pass_date, replace (n.message, '', a.project_name_vchr) as cur_message from (select substring (my_point, 1, charindex ( ')', my_point)) as my_point, pass_date, project_name_vchr from (select pass_date, project_name_vchr, cur_point, substring (cur_point, charindex ( '' @myid '@', cur_point) len ( '' @myid '@'), LEN (CUR_POINT)) AS MY_POINT from TBL_PROJECT_INFO WHERE CUR_UID LIKE '%' @myid '%' And Charindex ('' @myid '@', cur_point)> 0) AS A) AS a left outer join tbl_pending_notice n on a.my_point = n.point step flow

1. In the CUR_UID, replace my user coding to the next user code;

2, in Cur_Point, replace my logo to the next sign

Example: The current user 34 is transmitted to the user 25 after step (0/4), and then passes to the user 25, step (0/5)

SQL

Declare @ProjectId bigint Declare @MyId varchar (50) Declare @NextId varchar (50) Declare @MyPoint varchar (50) Declare @NextPoint varchar (50) Set @ ProjectId = 0 Set @MyId = '(34)' Set @ NextId = '(25)' set @mypoint = '(34) @ (0/4)' set @NextPoint = '(25) @ (0/5)' update tbl_project_info set pass_date = getdate (), cur_uid = replace (cur_uid, @ Myid, @ nextid, cur_point = replace (cur_point, @ mypoint, @ nextpoint) Where id = @ ProjectID

转载请注明原文地址:https://www.9cbs.com/read-94569.html

New Post(0)